pyworkflow.gui.plotter module

This module implement the classes to create plots on xmipp.

class pyworkflow.gui.plotter.Plotter(x=1, y=1, mainTitle='', figsize=None, dpi=100, windowTitle='', fontsize=8, **kwargs)[source]

Bases: pyworkflow.viewer.View

Create different types of plots using the matplotlib library.

activate()[source]

Activate this figure.

backend = None
clear()[source]
close()[source]

Close current Plotter figure.

createCanvas()[source]
createSubPlot(title, xlabel, ylabel, xpos=None, ypos=None, yformat=False, projection='rectilinear')[source]

Create a subplot in the figure. You should provide plot title, and x and y axis labels. yformat True specified the use of global self.plot_yformat Posibles values for projection are:

‘aitoff’, ‘hammer’, ‘lambert’, ‘mollweide’, ‘polar’, ‘rectilinear’
draw()[source]
getCanvas()[source]
getColorBar(plot)[source]
getFigure()[source]
getLastSubPlot()[source]
isClosed()[source]

Return true if the figure have been closed.

legend(loc='best', **kwargs)[source]
savefig(*args, **kwargs)[source]
classmethod setBackend(value)[source]

Possible values are: - TkAgg for Tkinter - Agg for non-interactive plots.

show(interactive=True, block=False)[source]

This method should be overriden to implement how this particular view will be displayed in desktop.

showLegend(labels, loc='best')[source]
tightLayout()[source]
pyworkflow.gui.plotter.getHexColorList(numberOfColors, colorName='jet')[source]

Returns a list of hexColor