mcsas.mcsas.plotting module

Defines the format of the final report on success of an MC fit.

class CoordinateFormat(xname, xunit, yname, yunit)[source]

Bases: object

A Function object which sets up the particular formatting with axis name and associated unit at initialization time and formats plot coordinates given as (x,y) pair.

class PlotResults(allRes, dataset, axisMargin=0.3, outputFilename=None, modelData=None, autoClose=False, logToFile=False, queue=None)[source]

Bases: object

This function plots the output of the Monte-Carlo procedure in two windows, with the left window the measured signal versus the fitted measVal (on double-log scale), and the righthand window the size distribution.

figInit(nHists, figureTitle, nR=1)[source]

initialize figure and initialise axes using GridSpec. Each rangeinfo (nR) contains two rows and nHists + 1 columns. the top row axes are for placing text objects: settings and stats. The bottom row axes are for plotting the fits and the histograms TODO: add settings to window title? (next to figure_xy)

formatAlgoInfo()[source]

Preformats the algorithm information ready for printing the colons are surrounded by string-marks, to force laTeX rendering

formatRangeInfo(parHist, RI, weighti=0)[source]

Preformats the rangeInfo results ready for printing

plot1D(dataset, fitX0, fitMeasVal, qAxis)[source]

plots 1D data and fit

classmethod plotGrid(ax)[source]

Warning

method ‘mcsas.plotting.PlotResults.plotGrid’ undocumented

plotHist(plotPar, parHist, hAxis, rangei)[source]

histogram plot

plotInfo(InfoAxis)[source]

plots the range statistics in the small info axes above plots

plotPartial(fitX0, fitMeasVal, fitSTD, qAxis, label='MC partial measVal')[source]

plots 1D data and fit

plotStats(parHist, rangei, fig, InfoAxis)[source]

plots the range statistics in the small info axes above plots

setAxis(ah)[source]

Warning

method ‘mcsas.plotting.PlotResults.setAxis’ undocumented

class PlotSeriesStats[source]

Bases: object

Simple 1D plotting of series statistics.

plot(stats)[source]

Warning

method ‘mcsas.plotting.PlotSeriesStats.plot’ undocumented

show()[source]

Warning

method ‘mcsas.plotting.PlotSeriesStats.show’ undocumented

getTextSize(fig, fontProps)[source]

Returns the width and height of a character for the given font setup. This can be different on each platform.