Skip to content

matplotlib.pyplot shows "old data" #667

Answered by fernandezc
sschusser asked this question in Q&A
Discussion options

You must be logged in to vote

SpectroChemPy uses matplotlib's explicit style by default (see https://www.spectrochempy.fr/latest/userguide/plotting/plotting.html for a detailed description - where unfortunately I've just seen that there are some warning problems - I'll look into this later).
In fact, as the plot method returns a matplotlib Axe object, you can easily modify it using appropriate methods.

So we can write:

With arguments to the plot method

import spectrochempy as scp
A = scp.NDDataset(....something...)
ax = A.plot(xlim=(40,50))
scp.show()

or with explicit style

import spectrochempy as scp
A = scp.NDDataset(....something...)
ax = A.plot()
ax.set_xlim(40,50)
scp.show()

or with the implicit style (which requ…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by fernandezc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #666 on June 03, 2023 06:09.