Axes decorators#
Overview#
Create an axes. |
|
axis tuning. |
|
|
See pylab.box for details |
a simple code to clear a figure. |
|
Plot all colormap |
|
see pylab.figure for details. |
|
A Font properties selector. |
|
Add a grid to an axes. |
|
Add a legend to the axe. |
|
Save the current figure in a file. |
|
This node simply calls pylab.show(), which may be useful sometimes. |
|
Add a title to the current axe. |
|
Tune the ticks on an axis. |
|
Add a label on the x-axis. |
|
VisuAlea version of pylab.xlim |
|
Set the tick locations and labels. |
|
Add a label on the x-axis. |
|
VisuAlea version of pylab.ylim |
|
Set the tick locations and labels. |
Api#
axes decorators from pylab
- class openalea.pylab_decorators_wralea.py_pylab.PyLabAxes[source]#
Create an axes. See pylab.axes for details.
This node is useful if you want to create a polar axes.
- Parameters:
input – an optional input axes
clean (bool) – clear the axe if True (default is True)
left (float) – left boundary limit of the axes (default is 0.12)
bottom (float) – bottom boundary limit of the axes (default is 0.12)
width (float) – width of the axes (default is 0.78)
height (float) – height of the axes (default is 0.78)
axisbg (str) – color of the axes background
frameon (bool) – set the frame on (default is True)
polar (bool) – set the axes in polar mode (default is False)
xscale (str) – set the x axes scale (default is linear)
yscale (str) – set the y axes scale (default is linear)
xticks (str) – set the xticks (default is auto)
xticks – set the yticks (default is auto)
kwargs (dict) – more arguments may be provided as a dictionary
- Returns:
the current axes
- Example:
- class openalea.pylab_decorators_wralea.py_pylab.PyLabAxesDecorator[source]#
Node to connect patches or axes decorators to an axes
- Parameters:
axes – the axe to complete
whatever – a connector to use for connecting other nodes that add patches or decorators such as title and labels.
- Returns:
the current axes
- class openalea.pylab_decorators_wralea.py_pylab.PyLabAxis[source]#
axis tuning. See pylab.axis for details
Warning
not for production
- class openalea.pylab_decorators_wralea.py_pylab.PyLabBox[source]#
See pylab.box for details
- Parameters:
axes – an input pylab.axes
:param on’ boolean to turn on or off the box of the current axe
- Returns:
the current axes
- class openalea.pylab_decorators_wralea.py_pylab.PyLabClearFigure[source]#
a simple code to clear a figure. See pylab.clf for details
- Parameters:
axes – an axes to clear
- Returns:
the current axes
- class openalea.pylab_decorators_wralea.py_pylab.PyLabFigure[source]#
see pylab.figure for details.
- Parameters:
axes
num
figsize
dpi
facecolor
edgecolor
frameon
subplotpars
- Example:
- class openalea.pylab_decorators_wralea.py_pylab.PyLabFontProperties[source]#
A Font properties selector. See matplotlib.font_manager.FontProperties for details.
Warning
not to be used alone. Connect this node to a TextProperties node.
- Parameters:
- Returns:
a dictionary to be used by a FontProperties instance.
See also
TextProperties
- class openalea.pylab_decorators_wralea.py_pylab.PyLabGrid[source]#
Add a grid to an axes. See pylab.grid for details
- Parameters:
axes – an input axes
b (bool) – Set the grid on (default is True)
which (str) – where to set the lines (default is major ticks)
linestyle (str) – style of the lines (default is dotted)
color (str) – color of the lines )(default is black)
linewidth (float) – width of the lines (default is 1)
kwargs (dict) – further properties to fully customize the grid
- Returns:
the current axes
- Example:
- class openalea.pylab_decorators_wralea.py_pylab.PyLabLegend[source]#
Add a legend to the axe. see pylab.legend for details
- Parameters:
shadow – draw a shadow behind legend.
location – legend location. See
Locationsnumpoints – the number of points in the legend for line
markercolor
fancybox – draw a frame with a round fancybox
ncol – number of columns. default is 1
mode – if mode is “expand”, the legend will be horizontally expanded
title – the legend title
prop – connect an optional :class`PyLabFontProperties` object to customise further
- Example:
- class openalea.pylab_decorators_wralea.py_pylab.PyLabOrigin[source]#
Set the origin. See pylab.imshow for instance.
- class openalea.pylab_decorators_wralea.py_pylab.PyLabSaveFig[source]#
Save the current figure in a file. See pylab.savefig for details.
- class openalea.pylab_decorators_wralea.py_pylab.PyLabShow[source]#
This node simply calls pylab.show(), which may be useful sometimes.
The input and output connectors are not used by the function itself. There are present to allow this node to be used in a dataflow. Therefore the output is simply set to be the input parameter.
- class openalea.pylab_decorators_wralea.py_pylab.PyLabTextProperties[source]#
Create a TextProperties dict. See pylab.Text for details.
- class openalea.pylab_decorators_wralea.py_pylab.PyLabTickParams[source]#
Tune the ticks on an axis. See pylab.tick_params for details.
- Parameters:
axes – the axes to tune.
axis (str) – which axis to manipulate (‘x’, ‘y’, ‘both’) (default is ‘both’)
reset (bool) – set all parameters to defaults
which (str) – apply arguments to major ticks only (default is major)
direction (str) – [‘in’ | ‘out’] Puts ticks inside or outside the axes.
length (int) – Tick length in points
width (int) – Tick width in points
pad (int) – Distance in points between tick and label.
labelsize – (default 12)
labelcolor – (default black)
zorder – (default 0)
bottom (bool) – default True
top (bool)
left (bool)
right (bool)
labelbottom (bool) – (default True)
labeltop (bool) – (default False)
labelleft (bool) – (default True)
labelright (bool) – (default False)
- Example:
- class openalea.pylab_decorators_wralea.py_pylab.PyLabTitle[source]#
Add a title to the current axe. See pylab.title for details
- class openalea.pylab_decorators_wralea.py_pylab.PyLabXLabel[source]#
Add a label on the x-axis. See pylab.xlabel for details
- Parameters:
axes – an optional axes where new data will be plotted.
text (str)
fontsize (int) – font size (default 12)
verticalalignement (str) – (default is top)
horizontalalignment (str) – (default is center)
textproperties (dict) – output of a
PyLabFontPropertiesNodekwargs (dict) – any other key/value pair
- Returns:
the current axes
- Example:
- class openalea.pylab_decorators_wralea.py_pylab.PyLabXLim[source]#
VisuAlea version of pylab.xlim
- Parameters:
axes
xmin
xmax
kwargs
- Returns:
modified axes
- Example:
Note
xmin must be less than xmax
- class openalea.pylab_decorators_wralea.py_pylab.PyLabXTicks[source]#
Set the tick locations and labels. See pylab.xticks for details.
- Parameters:
axes – the current axes to manipulate.
locs (array) – (default is empty)
labels (array) – (default is empty)
orientation (float)
- Returns:
the current axes
- Example:
- class openalea.pylab_decorators_wralea.py_pylab.PyLabYLabel[source]#
Add a label on the x-axis. See pylab.xlabel for details
- Parameters:
text
fontsize
verticalalignement
horizontalalignment
properties (text) – output of a
TextPropertiesNode
- Example:
See
PyLabXLabel
- class openalea.pylab_decorators_wralea.py_pylab.PyLabYLim[source]#
VisuAlea version of pylab.ylim
- Parameters:
axes
ymin
ymax
kwargs
- Returns:
modified axes
See also
Note
ymin must be less than ymax
- class openalea.pylab_decorators_wralea.py_pylab.PyLabYTicks[source]#
Set the tick locations and labels. See pylab.xticks for details.
- Parameters:
axes – the current axes to manipulate.
locs (array) – (default is empty)
labels (array) – (default is empty)
orientation (float)
- Returns:
the current axes
- Example:
see
PyLabXTicks