Known subclasses: yampex.plot.Plotter

I am an abstract base class with the option setting methods of the Plotter.

Keep a copy of the source handy to see all the plotting options you can set.

Method set Before this subplot is drawn, do a set_name=value command to the axes. You can call this method as many times as you like with a different attribute name and value.
Method add_plotKeyword Add a keyword to the underlying Matplotlib plotting call.
Method clear_plotKeywords Clears all keywords for this subplot.
Method set_loglog Makes both axes logarithmic, unless called with False.
Method set_semilogx Makes x-axis logarithmic, unless called with False.
Method set_semilogy Makes y-axis logarithmic, unless called with False.
Method set_bar Specifies a bar plot, unless called with False.
Method set_stem Specifies a stem plot, unless called with False.
Method set_step Specifies a step plot, unless called with False.
Method set_error Specifies an error bar plot, unless called with False.
Method set_useLabels Has annotation labels point to each plot line instead of a legend, with text taken from the legend list.
Method set_grid Adds a grid, unless called with False.
Method set_timex Uses intelligent time scaling for the x-axis, unless called with False.
Method set_firstVectorTop Has the first dependent vector (the second argument to the Plotter object call) determine the top (maximum) of the displayed plot boundary.
Method set_bump Bumps up the common y-axis upper limit.
Method set_zeroBottom Sets the bottom (minimum) of the Y-axis range to zero, unless called with False.
Method set_zeroLine Adds a horizontal line at the specified y value (default is y=0) if the Y-axis range includes that value.
Method add_marker Appends the supplied marker style character to the list of markers being used.
Method add_line Appends the supplied line style character to the list of line styles being used.
Method set_yscale Rescales the plotted height of all vectors after the first dependent one to be plotted, relative to that first dependent one, by setting a y scale for it.
Method set_axisExact Forces the limits of the named axis ("x" or "y") to exactly the data range, unless called with False.
Method set_tickSpacing Sets the major tick spacing for axisName ("x" or "y"), and minor tick spacing as well.
Method set_minorTicks Enables minor ticks for axisName ("x" or "y").
Method set_axvline Adds a vertical dashed line at the data point with integer index k.
Method set_xlabel Sets the x-axis label.
Method set_ylabel Sets the y-axis label.
Method add_legend Adds the supplied format-substituted text to the list of legend entries.
Method clear_legend Clears the list of legend entries.
Method set_legend Sets the list of legend entries.
Method add_annotation Adds the text supplied after index k at an annotation of the plotted vector.
Method clear_annotations Clears the list of annotations.
Method add_textBox Adds a text box to the specified quadrant of the subplot.
Method clear_textBoxes Clears the dict of text boxes.
Method set_title Sets a title for all subplots (if called out of context) or for just the present subplot (if called in context).
Method set_fontsize Sets the fontsize of the specified artist name.
Method _axisOpt Undocumented
def set(self, name, value):

Before this subplot is drawn, do a set_name=value command to the axes. You can call this method as many times as you like with a different attribute name and value.

Use this method in place of calling the Plotter instance with keywords. Now, such keywords are sent directly to the underlying Matplotlib plotting call.

def add_plotKeyword(self, name, value):

Add a keyword to the underlying Matplotlib plotting call.

def clear_plotKeywords(self):

Clears all keywords for this subplot.

def set_loglog(self, yes=True):

Makes both axes logarithmic, unless called with False.

def set_semilogx(self, yes=True):

Makes x-axis logarithmic, unless called with False.

def set_semilogy(self, yes=True):

Makes y-axis logarithmic, unless called with False.

def set_bar(self, yes=True):

Specifies a bar plot, unless called with False.

def set_stem(self, yes=True):

Specifies a stem plot, unless called with False.

def set_step(self, yes=True):

Specifies a step plot, unless called with False.

def set_error(self, yes=True):

Specifies an error bar plot, unless called with False.

def set_useLabels(self, yes=True):

Has annotation labels point to each plot line instead of a legend, with text taken from the legend list.

Call with False to revert to default legend-box behavior.

def set_grid(self, yes=True):

Adds a grid, unless called with False.

def set_timex(self, yes=True):

Uses intelligent time scaling for the x-axis, unless called with False.

def set_firstVectorTop(self):

Has the first dependent vector (the second argument to the Plotter object call) determine the top (maximum) of the displayed plot boundary.

def set_bump(self, yes=True):

Bumps up the common y-axis upper limit.

If you don't manually set a yscale with a call to set_yscale, you can call this method to increase the common y-axis upper limit to 120% of what Matplotlib decides. Call with False to disable the bump.

def set_zeroBottom(self, yes=True):

Sets the bottom (minimum) of the Y-axis range to zero, unless called with False.

This is useful for plotting values that are never negative and where zero is a meaningful absolute minimum.

def set_zeroLine(self, y=0):

Adds a horizontal line at the specified y value (default is y=0) if the Y-axis range includes that value.

If y is None or False, clears any previously set line.

def add_marker(self, x, size=None):

Appends the supplied marker style character to the list of markers being used.

The first and possibly only marker in the list applies to the first vector plotted within a given subplot. If there is an additional vector being plotted within a given subplot (three or more arguments supplied when calling the Plotter object, and more than one marker has been added to the list, then the second marker in the list is used for that second vector plot line. Otherwise, the first (only) marker in the list is used for the second plot line as well.

You can specify a size for the marker as well.

def add_line(self, x=None, width=None):

Appends the supplied line style character to the list of line styles being used.

The first and possibly only line style in the list applies to the first vector plotted within a given subplot. If there is an additional vector being plotted within a given subplot (three or more arguments supplied when calling the Plotter object, and more than one line style has been added to the list, then the second line style in the list is used for that second vector plot line. Otherwise, the first (only) line style in the list is used for the second plot line as well.

You can specify a width for the line as well.

If no line style character or None is supplied, clears the list of line styles.

def set_yscale(self, x=True):

Rescales the plotted height of all vectors after the first dependent one to be plotted, relative to that first dependent one, by setting a y scale for it.

The result is two different twinned x-axes (one for the first dependent vector and one for everybody else) and a different y-axis label on the right.

Use a scale > 1 if the second (and later) vectors are bigger than the first and you want to expand the right-hand scale.

Use a scale < 1 if the second (and later) vectors are smaller than the first and you the right-hand scale to be shrunk.

Use True for the argument to have the scaling done automatically. (This is the default.)

def _axisOpt(self, optName, axisName, value=None):
Undocumented
def set_axisExact(self, axisName, yes=True):

Forces the limits of the named axis ("x" or "y") to exactly the data range, unless called with False.

def set_tickSpacing(self, axisName, major, minor=None):

Sets the major tick spacing for axisName ("x" or "y"), and minor tick spacing as well.

For each setting, an int will set a maximum number of tick intervals, and a float will set a spacing between intervals.

You can set minor True to have minor ticks set automatically, or False to have them turned off. (Major ticks are set automatically by default, and cannot be turned off.)

def set_minorTicks(self, axisName, yes=True):

Enables minor ticks for axisName ("x" or "y").

def set_axvline(self, k):

Adds a vertical dashed line at the data point with integer index k.

To set it to an x value, use a float for k.

def set_xlabel(self, x):

Sets the x-axis label.

Ignored if time-x mode has been activated with a call to set_timex. If called out of context, on the Plotter instance, this x-label is used for all subplots and only appears in the last (bottom) subplot of each column of subplots.

def set_ylabel(self, x):

Sets the y-axis label.

def add_legend(self, proto, *args):

Adds the supplied format-substituted text to the list of legend entries.

You may include a text prototype with format-substitution args, or just supply the final text string with no further arguments.

def clear_legend(self):

Clears the list of legend entries.

def set_legend(self, *args, **kw):

Sets the list of legend entries.

Supply a list of legend entries, either as a single argument or with one entry per argument. You can set the fontsize keyword to the desired fontsize of the legend; the default is 'small'.

def add_annotation(self, k, proto, *args, **kw):

Adds the text supplied after index k at an annotation of the plotted vector.

If there is more than one vector being plotted within the same subplot, you can have the annotation refer to a vector other than the first one by setting the keyword kVector to its non-zero index.

The annotation points to the point at index k of the plotted vector, unless k is a float. In that case, it points to the point where the vector is closest to that float value.

You may include a text prototype with format-substitution args following it, or just supply the final text string with no further arguments.

You can set the annotation to the first y-axis value that crosses a float value of k by setting y True.

def clear_annotations(self):

Clears the list of annotations.

def add_textBox(self, quadrant, proto, *args):

Adds a text box to the specified quadrant of the subplot.

Quadrants are "NW", "NE", "SE", and "SW". If there's already a text box there, a line will be added to it.

You may include a text prototype with format-substitution args, or just supply the final text string with no further arguments.

def clear_textBoxes(self):

Clears the dict of text boxes.

def set_title(self, proto, *args):

Sets a title for all subplots (if called out of context) or for just the present subplot (if called in context).

You may include a text prototype with format-substitution args, or just supply the final text string with no further arguments.

def set_fontsize(self, name, fontsize):

Sets the fontsize of the specified artist name.

Recognized names are 'legend' and 'annotations'.