rics.utility.plotting#
Plotting utility methods.
Functions
Call all configure-functions in this module. |
|
Configure Matplotlib figure plotting. |
|
Configure Seaborn figure plotting. |
|
|
Decorate an axis by setting the labels to multiples of pi. |
Classes
|
Protocol class indicating something that as an X-axis. |
- class HasXAxis(*args, **kwargs)[source]#
Bases:
ProtocolProtocol class indicating something that as an X-axis.
- configure() None[source]#
Call all configure-functions in this module.
See this demo notebook for an example of figures rendered using these settings.
- configure_seaborn() None[source]#
Configure Seaborn figure plotting.
Caveat Emptor: May do strange stuff 👻.
- Raises
ModuleNotFoundError – If Seaborn is not installed.
- configure_matplotlib() None[source]#
Configure Matplotlib figure plotting.
Caveat Emptor: May do strange stuff 👻.
- Raises
ModuleNotFoundError – If matplotlib is not installed.
- pi_ticks(ax: Union[Axis, HasXAxis], half_rep: Optional[Literal['frac', 'dec']] = None) None[source]#
Decorate an axis by setting the labels to multiples of pi.
The half_rep must be one of:
‘frac’: output 0/2π, 1/2π, 2/2π, 3/2π..
‘dec’: output 0.0π, 0.5π, 1.0π, 1.5π..
None: output 0, π, 2π, 3π..
- Parameters
ax – An axis to decorate, or an object with an xaxis attribute.
half_rep – Controls how fractions of pi are represented on the x-axis.