postpic.plotting package

The plot subpackage should provide an interface to various plot backends.

postpic.plotting.use(plotcls)[source]

Submodules

postpic.plotting.plotter_matplotlib module

This package provides the MatplotlibPlotter Class.

This Class can be used to plot Field Objects using the matplotlib interface.

class postpic.plotting.plotter_matplotlib.MatplotlibPlotter(reader, outdir='./', autosave=False, project=None, ext='png', size_inches=(9, 7), dpi=160, facecolor=(1, 1, 1, 0.01), transparent=False)[source]

Bases: object

Provides Methods to modify figures and axes objects for convenient plotting. It also autogenerates savenames and annotates the plot if a reader is given. A reader can be a dumpreader or a simulationreder.

class LinearSegmentedColormap(name, segmentdata, N=256, gamma=1.0)

Bases: matplotlib.colors.Colormap

Colormap objects based on lookup tables using linear segments.

The lookup table is generated using linear interpolation for each primary color, with the 0-1 domain divided into any number of segments.

static from_list(name, colors, N=256, gamma=1.0)

Make a linear segmented colormap with name from a sequence of colors which evenly transitions from colors[0] at val=0 to colors[-1] at val=1. N is the number of rgb quantization levels. Alternatively, a list of (value, color) tuples can be given to divide the range unevenly.

set_gamma(gamma)

Set a new gamma value and regenerate color map.

static addField1d(ax, field, log10plot=True, xlim=None, ylim=None, scaletight=None)[source]
static addField2d(figax, field, log10plot=True, interpolation='none', contourlevels=array([], dtype=float64), saveandclose=True, xlim=None, ylim=None, clim=None, savecsv=False, lineoutx=False, lineouty=False, **kwargs)[source]
static addFields1d(ax, *fields, **kwargs)[source]
static addaxislabels(ax, field)[source]
static annotate(figorax, title=None, time=None, step=None, project=None, dump=None, infostring=None, infos=None)[source]
static annotate_fromfield(figorax, field)[source]
static annotate_fromreader(figorax, reader)[source]
axesformatterx = <matplotlib.ticker.ScalarFormatter object>
axesformattery = <matplotlib.ticker.ScalarFormatter object>
efieldcdict = {'blue': ((0, 1, 1), (0.5, 1, 1), (1, 0, 0)), 'green': ((0, 0, 0), (0.5, 1, 1), (1, 0, 0)), 'red': ((0, 0, 0), (0.5, 1, 1), (1.0, 1, 1))}
lastsavename()[source]

returns the last savenme. If there wasnt a last a new savename is created.

matplotlib = <module 'matplotlib' from '/usr/lib/python3/dist-packages/matplotlib/__init__.py'>
plotField(field, autoreduce=True, maxlen=6000, name=None, **kwargs)[source]

This is the main method, that should be used for plotting.

plotField2d(field, name=None, **kwargs)[source]
plotFields(*fields, **kwargs)[source]
plotFields1d(*fields, **kwargs)[source]
plotallderived(dumpreader)[source]

plots all fields dumped.

project
savefig(fig, key)[source]
savename(key, ext=None)[source]
static settext_ax(ax, title=None, ur=None, ur2=None, ul=None, ul2=None, center=None)[source]
static settext_fig(fig, title=None, ur=None, ur2=None, ul=None, ul2=None, center=None)[source]
symmap = <matplotlib.colors.LinearSegmentedColormap object>
static symmetricclim(ax)[source]

symmetrize the clim around 0.

static symmetricclimaximage(aximage)[source]

symmetrize the clim around 0.