-
As I know the only way to handle signal plotting, is through self.plot(). But my problem with this is that it always creates its own figure for it. and if I want to do anything further on it like select a line ROI I am limited to this way of plotting. What I want to achieve is the example below, but on a predefined figure, that I can update, so I do not need to create a new one every time I am plotting a signal. Am I missing something? import hyperspy.api as hs line_roi = hs.roi.Line2DROI(0, 0, 512, 512, 10) im.plot() #this is the part roi1D = line_roi.interactive(im, color="yellow") |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
As far as I know, I don't think that's possible with I know the methods in the %matplotlib ipympl
import hyperspy.api as hs
import scipy.misc
import matplotlib.pyplot as plt
im = hs.signals.Signal2D(scipy.datasets.ascent())
f = plt.figure()
hs.plot.plot_images([im], fig=f) The methods to look at would be |
Beta Was this translation helpful? Give feedback.
-
Using an already defined matplotlib figure it not possible yet but it is being implemented as part of hyperspy/hyperspy#3343. What is your use case? Why do you need to put it in an existing matplotlib figure? |
Beta Was this translation helpful? Give feedback.
Using an already defined matplotlib figure it not possible yet but it is being implemented as part of hyperspy/hyperspy#3343.
What is your use case? Why do you need to put it in an existing matplotlib figure?