Note
Go to the end to download the full example code.
Choose an explicit plot type for a 2D IR dataset#
This example compares a few explicit plotting methods available for the same infrared dataset.
import spectrochempy as scp
Load and prepare the dataset#
dataset = scp.read("irdata/nh4y-activation.spg")
dataset = dataset[:, 4000.0:650.0]
dataset.y -= dataset.y[0]
dataset.y.ito("hour")
dataset.y.title = "Time on stream"
dataset[:, 1290.0:920.0] = scp.MASKED
prefs = scp.preferences
prefs.figure.figsize = (7, 4)
Single-spectrum line plot#
single = dataset[0]
_ = single.plot()

2D dataset plots#
Explicit methods make the intended representation clear:
Customize plot options#

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 2.566 seconds)


