Drawing#

PyLabAxhspan()

Axis Horizontal Span.

PyLabAxvspan()

Axis Vertical Span.

PyLabAxhline()

Draw a horizontal line at y from xmin to xmax.

PyLabAxvline()

Draw a vertical line at y from xmin to xmax.

PyLabAnnotate()

Annotate the x, y point xy with text.

PyLabBBox()

Create a dictionary to store bbox key/value pairs.

PyLabYAArowDict()

Create a dictionary to store yaarow key/value pairs.

PyLabFancyArrowDict()

Create a dictionary to store arrow key/value pairs.

Api#

pylab nodes related to drawings in a pylab.axes

class openalea.pylab_drawing_wralea.py_pylab.PyLabAnnotate[source]#

Annotate the x, y point xy with text. See pylab.annotate for details

If the dictionary has a key arrowstyle, a FancyArrowDict instance is created with the given dictionary and is drawn. Otherwise, a YAArow patch instance is created and drawn. Valid keys for YAArow are

Parameters:
  • axes – an optional axes where new data will be plotted.

  • text – the text to add in the axe

  • xy (tuple) – a tuple to set the xy coordinates of the arrow’s head

  • xytext (str) – a tuple to set the xy coordinates of the text

  • xycoords (str) – type of coordinates used to place xy tuple

  • xytext – type of coordinates used to place xytext tuple

  • arrowprops (dict) – could be a PyLabYAArrow or PyLabFancyArrowDict dictionary.

  • bbox (dict) – bbox where to insert the text. Use PyLabBbox dictionary

  • kwargs (dict)

Example:

class openalea.pylab_drawing_wralea.py_pylab.PyLabAxhline[source]#

Draw a horizontal line at y from xmin to xmax. See pylab.axhline for details.

Parameters:
  • axes – an optional axes where new data will be plotted.

  • y (float) – the y position

  • xmin (float) – starting x position

  • xmax (float) – ending x position

  • hold (bool) – True by default

  • Line2D (dict kwargs or) – connect a Line2D object (optional)

Returns:

  • current axe

  • pylab.axhline output

See also

in VisuAlea, see pylab/test/boxplot composite node.

Example:

class openalea.pylab_drawing_wralea.py_pylab.PyLabAxhspan[source]#

Axis Horizontal Span. See pylab.axvspan for details

Draw a horizontal span (rectangle) from ymin to ymax. With the default values of xmin = 0 and xmax = 1.

Parameters:
  • axes – an optional axes where new data will be plotted.

  • xmin (float) – starting x position

  • xmax (float) – ending x position

  • ymin (float) – starting y position

  • ymax (float) – ending y position

  • hold (bool) – True by default

  • kwargs – connect a Patch/polygon object (optional) to further customize the span

Returns:

  • current axe

  • pylab.axhspan output

Example:

class openalea.pylab_drawing_wralea.py_pylab.PyLabAxvline[source]#

Draw a vertical line at y from xmin to xmax. See pylab.axhline for details.

Parameters:
  • axes – an optional axes where new data will be plotted.

  • x (float) – the x position

  • ymin (float) – starting y position

  • ymax (float) – ending y position

  • hold (int) – True by default

  • Line2D (dict kwargs or) – connect a Line2D object (optional)

Returns:

  • current axe

  • pylab.axhline output

See also

PyLabAxhline for dataflow example.

class openalea.pylab_drawing_wralea.py_pylab.PyLabAxvspan[source]#

Axis Vertical Span. See pylab.axhspan for details

Draw a vertical span (rectangle) from xmin to xmax. With the default values of ymin = 0 and ymax = 1.

Parameters:
  • xmin (float) – starting x position

  • xmax (float) – ending x position

  • ymin (float) – starting y position

  • ymax (float) – ending y position

  • hold (bool) – True by default

  • kwargs – connect a Patch/polygon object (optional) to further customize the span

Returns:

  • current axe

  • pylab.axhspan output

See also

PyLabAxhspan for dataflow example.

class openalea.pylab_drawing_wralea.py_pylab.PyLabBBox[source]#

Create a dictionary to store bbox key/value pairs.

This is then passed to an PyLabAnnotate node.

Parameters:
Returns:

a dictionary containing the boxstyle, fc and pad keys

See also

PyLabAnnotate for a dataflow example.

class openalea.pylab_drawing_wralea.py_pylab.PyLabFancyArrowDict[source]#

Create a dictionary to store arrow key/value pairs.

This is then passed to an PyLabAnnotate node.

Parameters:
  • arrowstyle (str)

  • connectionstyle (str) – default is ‘arc3’

  • relpos (tuple) – default is (0.5,0.5)

  • patchA (dict) – default is None

  • patchB (dict) – default is None

  • shrinkA (dict) – default is None

  • shrinkB (dict) – default is None

  • mutation_scale (float) – default is 1

  • mutation_aspect (float) – default is 1

  • pathPatch (dict) – default is None

  • ec – to be done. is it the style?

  • kwargs (dict) – default is {}

Returns:

a dictionary containing the arrow properties

See also

PyLabAnnotate for a dataflow example.

class openalea.pylab_drawing_wralea.py_pylab.PyLabYAArowDict[source]#

Create a dictionary to store yaarow key/value pairs.

This is then passed to an PyLabAnnotate node.

Parameters:
Returns:

a dictionary containing the arrow properties

See also

PyLabAnnotate for a dataflow example.