The ConvergenceScanPlot class provides a simple way for quickly plotting the result of a convergence scan.

Class documentation

class DREAM.ConvergenceScanPlot.ConvergenceScanPlot(scan=None)

Bases: object




scan (ConvergenceScan) – ConvergenceScan objec to plot results from.

isConverged(yesno=True, runIndex=0)

Checks whether the ConvergenceScan result is converged in all output parameters with respect to the scan parameter ‘scanParameter’. If ‘scanParameter’ is ‘None’, all scan parameters are returned.


yesno (bool) – If True, returns a single scalar value declaring whether or not all scans are converged.


If yesno is False, returns a dict of scan parameters, each of which in turn contains dicts of output parameters, which are either True or False depending on if the scan was converged in that output parameter or not.

Return type



Load a ConvergenceScan result to analyse.


scan – Either a ConvergenceScan object or a string. If the former, the result of that scan is loaded. Otherwise, the result is assumed to be stored in the file with the name given by the string.

plot(plotShape=None, subplot=True, combineOutput=True, normalized=False)

Plots the result of the convergence scan.

  • plotShape (tuple) – If subplot is True, sets the shape of the subplot to create (i.e. a tuple with two integer values). The product of the elements of this tuple must be greater than or equal to the number of scan parameters (times the number of output parameters if ‘combineOutput’ is False).

  • subplot (bool) – If True, plots everything in a single window (but on separate axes).

  • combineOutput (bool) – If True, plots the convergence of all output parameters on the same axes. This forces normalized = True (but only if there are several output parameters).

  • normalized (bool) – If True, plots relative error in the parameter (compared to the most well-resolved run). Otherwise, the output parameters are plotted in absolute units. (This parameter is automatically forced to True if combineOutput is True).