postpic.plotting package¶
The plot subpackage should provide an interface to various plot backends.
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)¶ Create a LinearSegmentedColormap from a list of colors.
- Parameters
name (str) – The name of the colormap.
colors (array-like of colors or array-like of (value, color)) – If only colors are given, they are equidistantly mapped from the range \([0, 1]\); i.e. 0 maps to
colors[0]
and 1 maps tocolors[-1]
. If (value, color) pairs are given, the mapping is from value to color. This can be used to divide the range unevenly.N (int) – The number of rgb quantization levels.
gamma (float) –
-
reversed
(name=None)¶ Return a reversed instance of the Colormap.
- Parameters
name (str, optional) – The name for the reversed colormap. If it’s None the name will be the name of the parent colormap + “_r”.
- Returns
The reversed colormap.
- Return type
-
set_gamma
(gamma)¶ Set a new gamma value and regenerate color map.
-
static
-
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
annotate
(figorax, title=None, time=None, step=None, project=None, dump=None, infostring=None, infos=None)[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))}¶
-
matplotlib
= <module 'matplotlib' from '/usr/lib/python3.8/site-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.
-
property
project
¶
-
symmap
= <matplotlib.colors.LinearSegmentedColormap object>¶
-
class