[1]:
import sys

import rics

# Print relevant versions
print(f"{rics.__version__=}")
print(f"{sys.version=}")
!git log --pretty=oneline --abbrev-commit -1
rics.__version__='3.0.0'
sys.version='3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0]'
d2093a4 (HEAD, origin/main, origin/HEAD, main) Update help link in TOML files

Pi ticks#

Rounding is done so that the ticks start/end to the closest relevant multiple of pi at both ends. This means a multiple of π when half=None or π/2 when half='frac' or half='dec'.

[2]:
from rics import configure_stuff, plotting
import numpy as np
import matplotlib.pyplot as plt

configure_stuff()
👻 Configured some stuff just the way I like it!
[3]:
fig, axes = plt.subplots(nrows=3, figsize=(16, 8))

for half_rep, ax in zip(["frac", "dec", None], axes):
    x = np.linspace(-11, 10, 1000)
    ax.plot(x, np.sin(x))
    ax.set_title(f"Tick labels with {half_rep=}")
    plotting.pi_ticks(ax, half_rep=half_rep)
../../../../_images/documentation_examples_notebooks_plotting_pi_ticks_3_0.png
[ ]: