lstein.lstein.LSteinCanvas.__init__¶
- LSteinCanvas.__init__(thetaticks: Tuple[List[float], List[Any]] | List[float], xticks: Tuple[List[float], List[Any]] | List[float], yticks: Tuple[List[float], List[Any]] | List[float], thetaguidelims: Tuple[float, float] = None, thetaplotlims: Tuple[float, float] = None, xlimdeadzone: float = 0.3, panelsize: float = 0.39269908169872414, thetalabel: str = None, xlabel: str = None, ylabel: str = None, thetaarrowpos_th: float = None, ylabpos_th: float = None, thetatickkwargs: dict = None, thetaticklabelkwargs: dict = None, thetalabelkwargs: dict = None, xtickkwargs: dict = None, xticklabelkwargs: dict = None, xlabelkwargs: dict = None, ylabelkwargs: dict = None)[source]¶
constructor
initializes class
computes inferred attributes
- Parameters
- thetaticks
Tuple[List[float],List[Any]], List[float]
ticks to draw for the theta-axis (angular positioning)
- also defines axis limits applied to theta
i.e., in azimuthal direction
np.min(thetaticks[0]) corresponds to the lowest value of theta that will be plotted
np.max(thetaticks[0]) corresponds to the highest value of theta that will be plotted
- if List[float]
will use thetaticks as labels as well
- if Tuple[List[float],List[Any]]
will use thetaticks[1] as ticklabels
- xticks
Tuple[List[float],List[Any]], List[float]
ticks (circles) to draw for the x-axis
- also defines axis limits applied to x
i.e., in radial direction
xticks[0][0] corresponds to the end of xlimdeadzone
xticks[0][-1] corresponds to the value plotted at the outer bound of the LStein plot
xticks[0] has to be sorted in ascending or descending order
to invert the x-axis pass xticks[0] in a reverse sorted manner
- if List[float]
will use xticks as labels as well
- if Tuple[List[float],List[Any]]
will use xticks[1] as ticklabels
- yticks
Tuple[List[float],List[Any]], List[float]
ticks to draw for the y-axis
- also defines axis limits applied to y
i.e., bounds of the respective panel
yticks[0][0] corresponds to the start of the panel
yticks[0][-1] corresponds to the end of the panel
yticks[0] has to be sorted in ascending or descending order
to invert the y-axis pass yticks[0] in a reverse sorted manner
- if List[float]
will use yticks as ticklabels as well
- if Tuple[List[float],List[Any]]
will use yticks[1] as ticklabels
- thetaguidelims
Tuple[float,float], optional
- range to be spanned by the entire plot guides
only affects the background grid
in radians
- the default is None
will be set to (0,np.pi)
an semi-circle will be plotted
- thetaplotlims
Tuple[float,float], optional
range to be populated by with theta-panels
- sets the reference point for thetaticks
np.min(thetaticks[0]) will be plotted at thetaplotlims[0]
np.max(thetaticks[0]) will be plotted at thetaplotlims[1]
in radians
- the default is None
will be set to thetaguidelims with extra padding of panelsize/2
- xlimdeadzone
float, optional
amount of space to leave empty in the center of the plot
provided as a fraction of the entire plot-radius
- used to
reduce projection effects at small radii
have space for labelling
- the default is 0.3
30% of the radial direction is left empty
- panelsize
- float, optional
global default of (angular) space any created panel will occupy
in rthetalims
can be overridden by calling self.add_panel()
the entire canvas can allocate (thetaguidelims[1]-thetaguidelims[0])/panelsize evenly distributed, nonoverlapping panels
the default is np.pi/8
- thetalabel
str, optional
label of the theta-axis
- the default is None
will be set to “”
- xlabel
str, optional
label of the x-axis
- the default is None
will be set to “”
- ylabel
str, optional
label of the y-axis
- the default is None
will be set to “”
- th_arrowpos_th
float, optional
position of the arrow indicating the theta-axis
given in units of theta
- the default is None
will be set to np.mean(thetaticks[0])
- ylabpos_th
float, optional
position of ylabel
given in units of theta
- the default is None
will be set to thetaticks[0][0]
at the first tick of the theta axis
- thetatickkwargs
dict, optional
kwargs to pass to ax.plot() when drawing the theta ticks
used for styling
- the default is None
will be set to dict(c=plt.rcParams[“grid.color”], ls=plt.rcParams[“grid.linestyle”], lw=plt.rcParams[“grid.linewidth”])
- thetaticklabelkwargs
dict, optional
kwargs to pass to ax.annotate() calls used for defining the ticklabels of the theta-axis
used for styling
pad determines the padding w.r.t. the ticks
- the default is None
will be set to dict(c=plt.rcParams[“axes.labelcolor”], ha=”center”, va=”center”, pad=0.2)
- thetalabelkwargs
dict, optional
kwargs to pass to ax.annotate() call used for defining the axis label of the theta-axis
used for styling
- the default is None
will be set to dict(c=plt.rcParams[“axes.labelcolor”], ha=”center”, va=”center”)
- xtickkwargs
dict, optional
kwargs to pass to ax.plot() when drawing xticks (circles)
used for styling
- the default is None
will be set to dict(c=plt.rcParams[“grid.color”], ls=plt.rcParams[“grid.linestyle”], lw=plt.rcParams[“grid.linewidth”])
- xticklabelkwargs
dict, optional
kwargs to pass to ax.annotate() calls used for defining the ticklabels of the x-axis
used for styling
- the default is None
will be set to dict(c=plt.rcParams[“axes.labelcolor”], textcoords=”offset fontsize”, xytext=(-1,-1))
- xlabelkwargs
dict, optional
kwargs to pass to ax.annotate() call used for defining the axis label of the x-axis
used for styling
- the default is None
will be set to dict(c=plt.rcParams[“axes.labelcolor”], textcoords=”offset fontsize”, xytext=(-2,-2))
- ylabelkwargs
dict, optional
kwargs to pass to ax.annotate() call used for defining the axis label of the y-axis
used for styling
pad determines the padding w.r.t. the ticks
- the default is None
will be set to dict(c=plt.rcParams[“axes.labelcolor”], pad=0.15)
Raises
Returns