rics.plotting#

Plotting utility methods.

Functions

configure()

Call all configure-functions in this module.

configure_matplotlib()

Configure Matplotlib figure plotting.

configure_seaborn()

Configure Seaborn figure plotting.

pi_ticks(ax[, half_rep])

Decorate an axis by setting the labels to multiples of pi.

Classes

HasXAxis(*args, **kwargs)

Protocol class indicating something that as an X-axis.

class HasXAxis(*args, **kwargs)[source]#

Bases: Protocol

Protocol class indicating something that as an X-axis.

xaxis: XAxis#

X-Axis attribute.

configure() None[source]#

Call all configure-functions in this module.

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: Axis | HasXAxis, half_rep: Literal['fraction', 'decimal', 'frac', 'dec', 'f', 'd'] | None = None) None[source]#

Decorate an axis by setting the labels to multiples of pi.

../_images/pi_ticks.png
Options for the half_rep argument.#

Value

Interpretation

Example output

None

Show integer multiples only.

0, π, 2π, 3π..

‘f’ or ‘fraction’

Halves of π use fractional representation.

0/2π, 1/2π, 2/2π, 3/2π..

‘d’ or ‘decimal’

Halves of π use decimal representation.

0.0π, 0.5π, 1.0π, 1.5π..

Parameters:
  • ax – An axis to decorate, or an object with an xaxis attribute.

  • half_rep – Controls how fractions of π are represented on the x-axis.