Skip to content

dq.mplstyle

mplstyle(*, usetex: bool = False)

Set custom Matplotlib style.

Warning

Documentation redaction in progress.

Examples

>>> x = jnp.linspace(0, 2 * jnp.pi, 101)
>>> ys = [jnp.sin(x), jnp.sin(2 * x), jnp.sin(3 * x)]

Before (default Matplotlib style):

>>> fig, ax = plt.subplots(1, 1)
>>> for y in ys:
...     ax.plot(x, y)
>>> ax.set(xlabel=r'$x$', ylabel=r'$\sin(x)$')

mplstyle_before

After (dynamiqs Matplotlib style):

>>> dq.mplstyle()
>>> fig, ax = plt.subplots(1, 1)
>>> for y in ys:
...     ax.plot(x, y)
>>> ax.set(xlabel=r'$x$', ylabel=r'$\sin(x)$')

mplstyle_after