y.p.Plotter(OptsBase) : class documentation

Part of yampex.plot View In Hierarchy Source for plot.py Project Page for yampex

I provide a Figure with one or more time-vector and XY subplots of Numpy vectors using Matplotlib.

If you supply an object other than a list or tuple that houses vectors and provides access to them by name as items (i.e., a dict or a Vectors object from the pingspice package) as a third argument, I will convert vector names to vectors for you in each plotting call.

Any keywords you supply to the constructor are used to set\_X the axes for all subplots. For example, yticks=[1,2,3] results in a set\_yticks([1,2,3]) command to the axes object for all subplots.

Method __init__ Undocumented
Method __getattr__ Undocumented
Method __enter__ Undocumented
Method __exit__ Undocumented
Method N_cols Undocumented
Method show Undocumented
Method getColor Undocumented
Method xBounds Undocumented
Method yBounds Undocumented
Method scaleTime Undocumented
Method parseArgs Undocumented
Method addLegend Undocumented
Method __call__ No summary

Inherited from OptsBase:

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_useLabels 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.
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 No summary
Method set_zeroBottom No summary
Method add_marker No summary
Method add_line No summary
Method set_yscale Manually sets the y-axis scaling.
Method set_axvline Adds a vertical dashed line at the data point with index k.
Method set_xlabel Sets the x-axis label. (Ignored if time-x mode has been activated with a call to set_timex.)
Method set_ylabel Sets the y-axis label.
Method add_legend No summary
Method clear_legend Clears the list of legend entries.
Method add_annotation No summary
Method clear_annotations Clears the list of annotations.
Method set_title Sets a subplot title. You may include a text prototype with format-substitution args, or just supply the final text string with no further arguments.
def __init__(self, N, *args, **kw):
Undocumented
def __getattr__(self, name):
Undocumented
def __enter__(self):
Undocumented
def __exit__(self, exc_type, exc_val, exc_tb):
Undocumented
def N_cols(self, N):
Undocumented
def show(self, windowTitle=None, subcall=False):
Undocumented
def getColor(self, k):
Undocumented
def xBounds(self, *args, **kw):
Undocumented
def yBounds(self, *args, **kw):
Undocumented
def scaleTime(self, vectors):
Undocumented
def parseArgs(self, args):
Undocumented
def addLegend(thisVector, thisLegend):
Undocumented
def __call__(self, *args, **kw):

Plots the second supplied vector (and any further ones) versus the first in the next subplot. If you supply an object that houses vectors and provides access to them as items, e.g., analysis.sim.Vectors of the pingspice package, as the first argument, you can supply vector names instead of the vectors themselves.

Options are set via the methods in OptsBase, including a title, a list of plot markers and linestyles, and a list of legend entries for the plots with those keywords. legend can also be set True to use the default Matplotlib legend.

Set useLabels to True to have annotation labels pointing to each plot line instead of a legend, with text taken from the legend list. (Works best in interactive apps.)

Add other text annotations by the sample index of the point within the independent (first) and dependent vectors, the text, and the vector index. The vector index starts with 0 for the second vector argument and first dependent variable vector.

Rescale all vectors after the first dependent one, relative to that first dependent one, by supplying a yscale. This will result in 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.

If you don't provide any such yScale, you can set bump to True to bump the common y-axis upper limit to 120% of what Matplotlib decides.

If your x-axis is for time with units in seconds, you can set timex to True and the x values will be in set to the most sensible units, e.g., nanoseconds for values < 1E-6. Any 'xlabel' keyword is disregarded in such case because the x label is set automatically.

Any keywords you supply to this call are used to set\_X the axes, e.g., ylabel="foo" results in a set\_ylabel("foo") command to the axes object, for this subplot only.

If you want to do everything with the next subplot on your own and only want a reference to its Axes object, just call this with no args. You can still supply keywords to do set\_X stuff if you wish.

API Documentation for yampex, generated by pydoctor at 2018-07-12 11:08:51.