y.p.Plotter(OptsBase) : class documentation
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
command to the
axes object for all subplots.
Inherited from OptsBase:
|Method||set_loglog||Makes both axes logarithmic, unless called with
|Method||set_semilogx||Makes x-axis logarithmic, unless called with
|Method||set_semilogy||Makes y-axis logarithmic, unless called with
|Method||set_useLabels||Has annotation labels point to each plot line instead of a legend, with
text taken from the legend list. Call with
|Method||set_grid||Adds a grid, unless called with
|Method||set_timex||Uses intelligent time scaling for the x-axis, unless called with
|Method||set_firstVectorTop||Has the first dependent vector (the second argument to the
|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
|Method||set_ylabel||Sets the y-axis label.|
|Method||clear_legend||Clears the list of legend entries.|
|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.|
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.,
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
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
If your x-axis is for time with units in seconds, you can set
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
Any keywords you supply to this call are used to
ylabel="foo" results in a
set\_ylabel("foo") command to the
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