Last update: | 12/06/14 |
---|
The Plot class is a simple class to plot data in CASSIS with the scripts:
import ScriptEnvironment
from Plot import Plot
Initialize a plot:
>>> p = Plot("Some title for the frame")
Create a simple plot with x and y data:
>>> p.plot(x, y)
Add another plot:
>>> p.add(x2, y2)
Close the plot:
>>> p.close()
Clear the frame:
>>> p.clear()
The plot method provides options to modify the appearance of the plot.
Examples:
# A plot with blue dashed line, a title and labels for x and y
p.plot(x, y, title="Mean intensities of the spectra",
ylabel="Intensity (K)", xlabel="Index", lineColor="blue", lineStyle="dash")
# A multiplot with "+", "^" and different legends for the data
p.plot(x1, y1, symbol="+", lineColor="black", legend="CO")
p.add(x2, y2, symbol="^", lineColor="magenta", legend="CH3OH")