def show_phaseDiagramPlot( self, label="", title="Diagram of states", legendOn=True, xLim=1, yLim=1, fontSize=10, getFig=False): """ Generates the Pappu-Das phase diagram (diagram of states), places this sequence on that plot, and creates it on the screen INPUT: -------------------------------------------------------------------------------- label | A label for the point on the phase diagram title | Plot title (DEFAULT = 'Diagram of states') legendOn | Boolean for if the figure legend should be displayed or not xLim | Max value for the x axis (fract. positive charge) (DEFAULT = 1) yLim | Max value for the y axis (fract. negative charge) (DEFAULT = 1) fontSize | Size of font for label (DEFAULT = 10) getFig | Returns a matplotlib figure object instead of simply displaying the | plot on the screen (DEFAULT = False) OUTPUT: -------------------------------------------------------------------------------- If the argument getFig is False (which it is by default) then the Uversky plot appears on the screen. If getFig is set to True then the function returns a matplotlib plt object, which can be further manipulated. """ if getFig: return plotting.show_single_phasePlot( self.get_fraction_positive(), self.get_fraction_negative(), label, legendOn, xLim, yLim, fontSize, getFig) else: plotting.show_single_phasePlot( self.get_fraction_positive(), self.get_fraction_negative(), label, title, legendOn, xLim, yLim, fontSize, getFig)
def show_single_phasePlot( fp, fn, label="", title="Diagram of states", legendOn=True, xLim=1, yLim=1, fontSize=10, getFig=False): """ Plot a single sequence on the Pappu-Das phase plot (diagram of states). INPUT: -------------------------------------------------------------------------------- fp | Fraction of positive residues fn | Fraction of negative residues label | On-plot label of sequence (DEFAULT = no label) title | Plot title (DEFAULT = "Diagram of states") legendOn | Include the phase diagram region legend (DEFAULT = True) xLim | Set upper limit for the x axis (DEFAULT = 1) yLim | Set upper limit for the y axis (DEFAULT = 1) fontSize | Set font size for the point labels (DEFAULT = 10) getFig | Returns a matplotlib figure object instead of simply displaying the | plot on the screen (DEFAULT = False) OUTPUT: -------------------------------------------------------------------------------- Nothing but a plot should be generated on screen """ return plotting.show_single_phasePlot( fp, fn, label, title, legendOn, xLim, yLim, fontSize, getFig)
def show_single_phasePlot(fp, fn, label="", title="Diagram of states", legendOn=True, xLim=1, yLim=1, fontSize=10, getFig=False): """ Plot a single sequence on the Pappu-Das phase plot (diagram of states). INPUT: -------------------------------------------------------------------------------- fp | Fraction of positive residues fn | Fraction of negative residues label | On-plot label of sequence (DEFAULT = no label) title | Plot title (DEFAULT = "Diagram of states") legendOn | Include the phase diagram region legend (DEFAULT = True) xLim | Set upper limit for the x axis (DEFAULT = 1) yLim | Set upper limit for the y axis (DEFAULT = 1) fontSize | Set font size for the point labels (DEFAULT = 10) getFig | Returns a matplotlib figure object instead of simply displaying the | plot on the screen (DEFAULT = False) OUTPUT: -------------------------------------------------------------------------------- Nothing but a plot should be generated on screen """ return plotting.show_single_phasePlot(fp, fn, label, title, legendOn, xLim, yLim, fontSize, getFig)