Plotter Annotations

The plotter allows various annotations (lines, arrows, text and ``spans'') to be added to the plot. These annotations are ``temporary'', when the plotter is next refreshed (e.g. plotter.plot or plotter.set_range) the annotations will be removed.

arrow(x,y,x+dx,y+dy)
Draw an arrow from a specified (x,y) position to (x+dx, y+dy). The values are in world coordinates. Addition arguments which must be passed are head_width and head_length
ASAP>plotter.arrow(-40,7,35,0,head_width=0.2, head_length=10)

axhline(y, xmin, xmax)
Draw a horizontal line at the specified y position (in world coordinates) between xmin and xmax (in relative coordinates, i.e. 0.0 is the left hand edge of the plot while 1.0 is the right side of the plot).
ASAP>plotter.axhline(6.0,0.2,0.8)

avhline(x, ymin, ymax)
Draw a vertical line at the specified x position (in world coordinates) between ymin and ymax (in relative coordinates, i.e. 0.0 is the left hand edge of the plot while 1.0 is the right side of the plot).
ASAP>plotter.axvline(-50.0,0.1,1.0)

axhspan(ymin, ymax,
xmin, xmax)
Overlay a transparent colour rectangle. ymin and ymax are given in world coordinates while xmin and xmax are given in relative coordinates
ASAP>plotter.axhspan(2,4,0.25,0.75)

axvspan(xmin, xmax,
ymin, ymax)
Overlay a transparent colour rectangle. ymin and ymax are given in relative coordinates while xmin and xmax are given in world coordinates
ASAP>plotter.axvspan(-50,60,0.2,0.5)

text(x, y, str)
Place the string str at the given (x,y) position in world coordinates.
ASAP>plotter.text(-10,7,"CO")

These functions all take a set of kwargs commands. These can be used to set colour, linewidth fontsize etc. These are standard matplotlib settings. Common ones include:

color, facecolor, edgecolor  
width, linewidth  
fontsize  
fontname Sans, Helvetica, Courier, Times etc
rotation Text rotation (horizontal, vertical)
alpha The alpha transparency on 0-1 scale

Examples:

  ASAP>plotter.axhline(6.0,0.2,0.8, color='red', linewidth=3)
  ASAP>plotter.text(-10,7,"CO", fontsize=20)

Malte Marquarding 2007-08-16