pwem.viewers.plotter module
- class pwem.viewers.plotter.EmPlotter(x=1, y=1, mainTitle='', **kwargs)[source]
Bases:
Plotter
Class to create several plots.
This Plotter class has some utilities to create a Matplotlib figure and add some plots to it. Params:
x, y: number of rows and columns of the grid for plots. mainTitle: figure main title. figsize: the size of the figure, if None, it will be guessed from x and y dpi: resolution, 100 by default. windowTitle: title for the whole windows.
- classmethod createFromFile(dbName, dbPreffix, plotType, columnsStr, colorsStr, linesStr, markersStr, xcolumn, ylabel, xlabel, title, bins, orderColumn, orderDirection)[source]
- plotAngularDistribution(title, rot, tilt, weight=[], max_p=40, min_p=5, color='blue')[source]
Create a special type of subplot, representing the angular distribution of weight projections.
- plotAngularDistributionFromMd(mdFile, title, **kwargs)[source]
Read the values of rot, tilt and weights from the metadata and plot the angular distribution. ANGLES are in DEGREES In the metadata:
rot: MDL_ANGLE_ROT tilt: MDL_ANGLE_TILT weight: MDL_WEIGHT
- plotAngularDistributionFromSet(mdSet, title, weightAttr=None, histogram=False, **kwargs)[source]
Read the values of the transformation matrix and plot its histogram or its angular distribution.
- Parameters
mdSet – Set with alignment information at with item.getTransform()
title – Title of the plot
- plotAngularDistributionHistogram(title, rot, tilt)[source]
Create a special type of subplot, representing the angular distribution of weight projections.
- plotData(xValues, yValues, color='blue', **kwargs)[source]
Shortcut function to plot some values. Params:
xValues: list of values to show in x-axis yValues: list of values to show as values in y-axis color: color for the plot. **kwargs: keyword arguments that accepts:
marker, linestyle
- plotDataBar(xValues, yValues, width, color='blue', **kwargs)[source]
Shortcut function to plot some values. Params:
xValues: list of values to show in x-axis yValues: list of values to show as values in y-axis color: color for the plot. **kwargs: keyword arguments that accepts:
marker, linestyle