tueplots.axes module#
Customise matplotlib axes (tueplots.axes
).
Provides functions to adjust axis appearance, including grid lines, spines, ticks, and legends.
Examples
>>> import matplotlib.pyplot as plt
>>> from tueplots import axes
>>>
>>> # Select a style bundle
>>> style = axes.spines(right=False, top=False)
>>>
>>> # Apply the style to matplotlib
>>> plt.rcParams.update(style)
>>>
>>> # Create a plot
>>> fig, ax = plt.subplots()
>>> ax.plot([0, 1, 2], [2, 1, 3])
>>> ax.set_xlabel("$x$ label")
>>> ax.set_ylabel("$y$ label")
>>> plt.show()
(Source code
, png
, hires.png
, pdf
)

- tueplots.axes.legend(*, shadow=False, frameon=True, fancybox=False)[source]#
Adjust the legend-style.
- tueplots.axes.lines(*, base_width=0.5, line_base_ratio=2.0, tick_major_base_ratio=1.0, tick_minor_base_ratio=0.5, tick_size_width_ratio=3.0, tick_major_size_min=3.0, tick_minor_size_min=2.0, axisbelow=True)[source]#
Adjust linewidth(s) according to a base width.