MDANSE icon indicating copy to clipboard operation
MDANSE copied to clipboard

Add save plot data button

Open oerc0122 opened this issue 4 months ago • 2 comments

Description of work Adds button to save plot data to file.

Fixes Fixes #765

To test Use save button. There are options to put %axis% and %line% to save each graph and each line to separate files.

oerc0122 avatar Nov 07 '25 21:11 oerc0122

It seems to me that the heatmap plot does not get saved correctly. I took a dynamic coherent structure factor calculation, s(q,omega) results, with energy axis from -2040 meV to 2040 meV, and Q from 1 to 2 inverse Angstroms. The resulting file had the energy values from 1 to -2040 and Q from 2 to 2040. So, the limits are probably swapped.

Minor detail 1: I was able to save an empty file from a plotting tab with no plot, from a plot with no datasets, and from a heatmap plot of a 1D dataset. Would it be better to disable the save button when we can expect the resulting file to be empty? That is, if that's easy to detect.

Minor detail 2: Could we extend the text of the save button, and maybe add a tooltip? Just to make it clear to the user that the "Save" button will not save an image, but a text file.

MBartkowiakSTFC avatar Nov 18 '25 14:11 MBartkowiakSTFC

Now my S(q,omega) heatmap has the correct limits for Q and omega, but it gets written out with 1000 steps in Q and 33 steps in energy. It should have been 33 steps in Q and 1000 in energy.

MBartkowiakSTFC avatar Nov 20 '25 18:11 MBartkowiakSTFC

For the record, I did some more testing of Single and Heatmap plots with and without normalisation. Everything worked as expected.

MBartkowiakSTFC avatar Dec 03 '25 10:12 MBartkowiakSTFC