Note
Go to the end to download the full example code
Apply built-in plotting styles
This example shows how to switch between built-in plotting styles for a single dataset without changing the plotting code itself.
from pathlib import Path
import spectrochempy as scp
Inspect available styles
Apply a style to one plot only
_ = dataset.plot(style="grayscale")
Combine style with plot options
_ = dataset.plot(style="grayscale", xlim=(1800, 1500), grid=True)
Change defaults via preferences
original_style = scp.preferences.style
scp.preferences.style = "ggplot"
_ = dataset.plot()
scp.preferences.style = original_style
Uncomment the following line to display all figures when running the script directly with Python.
# scp.show()
Total running time of the script: ( 0 minutes 0.000 seconds)