Subplots¶
-
class
arepy.plot.
subplot
(figure, row, col, xyz=False, **opt)¶ Subplot of a figure
- Parameters
figure (int) – Figure number
row (int) – Subplot row
col (int) – Subplot column
xyz (bool) – Use 3D axes
-
setOption
(**args)¶ Set an option
-
setLegend
(handles=None, labels=None, **nopt)¶ Set a legend
- Parameters
handles (list) – List of axis object handles (optional)
labels (list[str]) – Labels
-
setLegendLS
(linestyles, labels, color='black', **nopt)¶ Set a line-style legend
- Parameters
linestyle (list[str]) – A set of matplotlib line styles
labels (list[str]) – Line style labels
Example:
sp.setLegendLS([':','--'],['foo','bar'])
-
setLegendM
(markers, labels, color='black', **nopt)¶ Set a marker legend
- Parameters
markers (list[str]) – A set of matplotlib markers
labels (list[str]) – A set of marker labels
Example:
sp.setLegendM(['s','^'],['foo','bar'])
-
setImage
(data, extent=(0, 1, 0, 1), norm=None, normType='lin', normLim=None, xnorm=None, ynorm=None, **kwargs)¶ Set an image
A thin wrapper around the matplotlib imshow class, that additionally sets the image normalization.
- Parameters
data ([[float]*Y]*X) – Image pixel data on an x and y axis
extent (tuple[float]) – Extent of the x and y axis
norm (str) – Name of the image normalization.
normType (str) – Type of the norm: ‘lin’ or ‘log’
xnorm (str) – Name of the x-axis normalization
ynorm (str) – Name of the y-axis normalization
-
setColorbar
(location='right', label=None)¶ Set a colorbar
-
setColorbarNA
(pos, **nopt)¶ Plot a colorbar on arbitrary position
Example:
grp.setColorbarNA(pos=(1.0,0.2,0.01,0.6),label='Mass (g)')
-
addPlot
(x, y, twinx=False, xnorm=None, ynorm=None, **nopt)¶ Add a plot to the canvas
-
addStep
(x, y, twinx=False, xnorm=None, ynorm=None, **nopt)¶ Add a step plot to the canvas
-
addScatter
(*coord, xnorm=None, ynorm=None, **nopt)¶ Add a scatter to the canvas
-
addQuiver
(*coord, **nopt)¶ Add quivers to the canvas
-
addBar
(x, y, twinx=False, **nopt)¶ Add a barplot to the canvas
-
addLine
(axis, pos, twinx=False, **nopt)¶ Add a line to the plot
-
addCircle
(center, radius, twinx=False, **nopt)¶ Add a circle to the plot
-
addRectangle
(xy, width, height, **nopt)¶ Add a rectangle to the plot
-
addText
(text, loc, bgcolor=None, twinx=False, padding=None, **nopt)¶ Add text to the figure
- Parameters
text (src) – Text string
loc (str) – Location of the text on the plot
padding ((float)*2) – Padding of the text (horizontal,vertical)