lstein.lstein.LSteinCanvas.add_panel

LSteinCanvas.add_panel(theta: float, yticks: Tuple[List[float], List[Any]] | List[float] = None, panelsize: float = None, show_panelbounds: bool = False, show_yticks: bool = True, y_projection_method: Literal['y', 'theta'] = 'theta', ytickkwargs: dict = None, yticklabelkwargs: dict = None, panelboundskwargs: dict = None) LSteinPanel[source]

returns created LSteinPanel

  • method to add a LSteinPanel to the canvas

  • similar to matplotlibs fig.add_subplot()

Parameters
  • theta
    • float

    • theta value the panel is associated with

    • equivalent to 2.5th dimension of the dataset

    • determines where on the canvas the panel will be located
      • created panel will be centered around theta

  • yticks

    Tuple[List[float],List[Any]], List[float], optional - ticks to draw for the y-axis - also defines axis limits applied to y

    • i.e., bounds of the respective panel

    • np.min(yticks[0]) corresponds to the start of the panel

    • np.max(yticks[0]) corresponds to the end of the panel

    • if List[float]
      • will use yticks as ticklabels as well

    • if Tuple[List[float],List[Any]]
      • will use yticks[1] as ticklabels

    • overrides self.yticks

    • the default is None
      • will fall back to self.yticks

  • panelsize
    • float, optional

    • (angular) space the created panel will occupy

    • in radians

    • the entire canvas can allocate (thetaguidelims[1]-thetaguidelims[0])/panelsize evenly distributed, nonoverlapping panels

    • overrides self.panelsize

    • the default is None
      • will fall back to self.panelsize

  • show_panelbounds
    • bool, optional

    • whether to show bounds of the individual panels when rendering

    • the default is False

  • show_yticks
    • bool, optional

    • whether to show ticks and gridlines for y-values

    • the default is True

  • y_projection_mode
    • Literal[“theta”,”y”], optioal

    • method to use for the projection

    • the default is theta
      • uses LSteinPanel.project_xy_theta()

  • ytickkwargs
    • dict, optional

    • kwargs to pass to ax.plot() when drawing yticks (lines in radial direction)

    • 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”])

  • yticklabelkwargs
    • dict, optional

    • kwargs to pass to ax.annotate() calls used for defining the ticklabels 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”], ha=”center”, va=”center”, pad=0.1)

  • panelboundskwargs
    • dict, optional

    • kwargs to pass to ax.plot() when drawing bounds of each panel

    • used for styling

    • the default is None
      • will be set to dict(c=plt.rcParams[“axes.edgecolor”])

Raises

Returns
  • LSP
    • LSteinPanel

    • created panel