def save_single_phasePlot( fp, fn, filename, label="", title="Diagram of states", legendOn=True, xLim=1, yLim=1, fontSize=10, saveFormat='png'): """ Plot a single sequence on the Pappu-Das phase plot (diagram of states). INPUT: -------------------------------------------------------------------------------- fp | Fraction of positive residues fn | Fraction of negative residues filename | Path/name of file to save plot (.png is appended) 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 x axis (DEFAULT = 1) fontSize | Set font size for the point labels (DEFAULT = 10) saveFormat | Defines the file formal to save plots as. This parameter is passed to matplotlibs savefig command which supports the following filetypes: emf, eps, pdf, png, ps, raw, rgba, svg, svgz. (DEFAULT = png) OUTPUT: -------------------------------------------------------------------------------- Nothing but a plot should be generated on screen """ plotting.save_single_phasePlot( fp, fn, filename, label, title, legendOn, xLim, yLim, fontSize, saveFormat)
def save_single_phasePlot( fp, fn, filename, label="", title="Diagram of states", legendOn=True, xLim=1, yLim=1, fontSize=10): """ Plot a single sequence on the Pappu-Das phase plot (diagram of states). INPUT: -------------------------------------------------------------------------------- fp | Fraction of positive residues fn | Fraction of negative residues filename | Path/name of file to save plot (.png is appended) 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 x axis (DEFAULT = 1) fontSize | Set font size for the point labels (DEFAULT = 10) OUTPUT: -------------------------------------------------------------------------------- Nothing but a plot should be generated on screen """ plotting.save_single_phasePlot( fp, fn, filename, label, title, legendOn, xLim, yLim, fontSize)
def save_phaseDiagramPlot( self, filename, label="", title="Diagram of states", legendOn=True, xLim=1, yLim=1, fontSize=10): """ Generates the Pappu-Das phase diagram (diagram of states), places this sequence on that plot, and saves it at the <filename> location INPUT: -------------------------------------------------------------------------------- filename | Writeable filename 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) OUTPUT: -------------------------------------------------------------------------------- Nothing, but creates a .png file at the filename location """ plotting.save_single_phasePlot( self.get_fraction_positive(), self.get_fraction_negative(), filename, label, title, legendOn, xLim, yLim, fontSize)
def save_single_phasePlot(fp, fn, filename, label="", title="Diagram of states", legendOn=True, xLim=1, yLim=1, fontSize=10, saveFormat='png'): """ Plot a single sequence on the Pappu-Das phase plot (diagram of states). INPUT: -------------------------------------------------------------------------------- fp | Fraction of positive residues fn | Fraction of negative residues filename | Path/name of file to save plot (.png is appended) 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 x axis (DEFAULT = 1) fontSize | Set font size for the point labels (DEFAULT = 10) saveFormat | Defines the file formal to save plots as. This parameter is passed to matplotlibs savefig command which supports the following filetypes: emf, eps, pdf, png, ps, raw, rgba, svg, svgz. (DEFAULT = png) OUTPUT: -------------------------------------------------------------------------------- Nothing but a plot should be generated on screen """ plotting.save_single_phasePlot(fp, fn, filename, label, title, legendOn, xLim, yLim, fontSize, saveFormat)