xraylarch
xraylarch copied to clipboard
plotting improvements
should add functions for these plot options (probably for wxmplot):
plot text to user coordinates with arrows (mpl axes.annotate) plot config frame should expose 'toggle y log_scale'
bar graphs histograms expose mpl axhspan, axvspan contour plots as option or optional layer for imshow
plot text and arrows done. contour plots done.
A couple of things for wx/the plotter.py plugin:
"plot_axhline" works, but to draw the line, one has to click on the plot window. I think we have to force an update/draw after the plotter.Raise(), right?
"plot_axvline": should be corrected to "plotter.panel.axes.axvline(x, ymin=ymin, ymax=ymax, **kws)"?
In addition, I would ask if it is possible to expose from Matplotlib also the SVG file format in the save dialog. PNG is nice, but a vector format is more versatile.
Hi Mauro,
Thanks!
SVG saving is possible -- just give a file name ending in '.svg'. Similar for jpg, I believe. But, I fixed this (in wxmplot) so that PNG, SVG, and JPG are explicitly listed as output formats.
plot_axhline() and plot_axvline() were definitely badly broken. They work better know, but may need further work (xmin/xmax/ymin/ymax should be in data coordinates).
Cheers, --Matt