lstein.lstein.LSteinMPL¶
- class lstein.lstein.LSteinMPL(LSC: LSteinCanvas)[source]¶
represents matplotlib backend for plotting LStein
matplotlib backend to show an LSteinCanvas with all its LSteinPanel elements
ax is a method argument to ensure signature equivalence of different backends
- Attributes
LSC – see __init__()
Inferred Attributes
- Methods
add_xaxis()
add_thetaaxis()
add_yaxis()
add_ylabel()
add_yaxis()
scatter_()
plot_()
show()
- Dependencies
logging
matplotlib
numpy
Comments
- __init__(LSC: LSteinCanvas)[source]¶
constructor
initializes class
- Parameters
- LSC
LSteinCanvas
canvas to display
Raises
Returns
Methods
__init__(LSC)constructor
add_thetaaxis(ax)adds theta-axis to ax
add_xaxis(ax)adds x-axis to ax
add_yaxis(LSP, ax)adds y-axis of LSP to ax
add_ylabel(ax)adds y-label to ax
plot_(ax, x, y, *args, **kwargs)adds a lineplot of x and y to ax
scatter_(ax, x, y, *args, **kwargs)adds a scatterplot of x and y to ax
show(ax)display LStein plot in ax
- add_thetaaxis(ax: Axes)[source]¶
adds theta-axis to ax
method to add the theta-axis to ax
- Parameters
- ax
plt.Axes
axis to draw into
Raises
Returns
- add_xaxis(ax: Axes)[source]¶
adds x-axis to ax
method to add the x-axis to ax
- Parameters
- ax
plt.Axes
axis to draw into
Raises
Returns
- add_yaxis(LSP: LSteinPanel, ax: Axes)[source]¶
adds y-axis of LSP to ax
method to add the y-axis of LSP to ax
- Parameters
- LSP
LSteinPanel
y-axis of this canvas will be drawn
- ax
plt.Axes
axis to draw into
Raises
Returns
- add_ylabel(ax: Axes)[source]¶
adds y-label to ax
method to add the y-label to ax
- Parameters
- ax
plt.Axes
axis to draw into
Raises
Returns
- plot_(ax: Axes, x: ndarray, y: ndarray, *args, **kwargs)[source]¶
adds a lineplot of x and y to ax
method to add a lineplot
only to be called from within LSteinMPL.show()
- Parameters
- ax
plt.Axes
axis to draw into
- x
np.ndarray
x-values of the series
has to have same length as y
- y
np.ndarray
y-values of the series
has to have same length as x
- kwargs
kwargs to pass to ax.plot()
Raises
Returns
- scatter_(ax: Axes, x: ndarray, y: ndarray, *args, **kwargs)[source]¶
adds a scatterplot of x and y to ax
method to add a scatterplot
only to be called from within LSteinMPL.show()
- Parameters
- ax
plt.Axes
axis to draw into
- x
np.ndarray
x-values of the series
has to have same length as y
- y
np.ndarray
y-values of the series
has to have same length as x
- -kwargs
kwargs to pass to ax.scatter()
Raises
Returns