Add save plot data button
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.
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.
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.
For the record, I did some more testing of Single and Heatmap plots with and without normalisation. Everything worked as expected.