Migration from pyms.Display¶
pymassspec_plot replaces pyms.Display. The latter will eventually deprecated and removed.
Old |
New |
|---|---|
pyms.Display also provided a Display class.
Its methods were mostly thin wrappers around the functions in this library.
Old |
New |
|---|---|
No replacement † |
|
No replacement ‡ |
|
No replacement § |
|
Achievable through |
|
- †
pyms.Display.Display.do_plotting()did the following:Emit a warning if called without any plotting functions (e.g.
pyms.Display.Display.plot_ic()) being called.Set the
plot_labelas the axes title. Usematplotlib.axes.Axes.set_title()instead.Create a legend for the axes. Use
matplotlib.axes.Axes.legend()instead.Ensure the figure is drawn on the canvas. Use
matplotlib.figure.Figure.canvas.draw()instead.Configure a callback for the plot being clicked. Use
ClickEventHandlerinstead.
- ‡
pyms.Display.Display.get_5_largest()was used internally as part of the left click callback. Seepymassspec_plot.ClickEventHandler.get_n_largest()for a similar implementation.- §
pyms.Display.Display.onclick()was configured internally as an event callback. The same result can be obtained using theClickEventHandlerclass.