mantidproject / mslice

Source code for Mantid MSlice
http://mantidproject.github.io/mslice
1 stars 1 forks source link

956 data in cut plot distorted after ticking and unticking log scale in x axis #957

Closed GuiMacielPereira closed 8 months ago

GuiMacielPereira commented 9 months ago

Description of work:

To test:

Fixes #956

robertapplin commented 8 months ago

Thanks for the changes. Just did some functional testing and I get an error specifically for this part of the instructions:

Go to Information > Bragg Peaks > check Aluminium Change y axis to log scale

Traceback (most recent call last):
  File "C:\Users\mlc47243\Documents\mantid-dev\mslice\src\mslice\presenters\plot_options_presenter.py", line 126, in get_new_config
    setattr(self._model, key, value)
  File "C:\Users\mlc47243\Documents\mantid-dev\mslice\src\mslice\plotting\plot_window\cut_plot.py", line 675, in y_log
    linthresh_val = _gca_sym_log_linear_threshold(axis_data)
  File "C:\Users\mlc47243\Documents\mantid-dev\mslice\src\mslice\plotting\plot_window\cut_plot.py", line 36, in _gca_sym_log_linear_threshold
    axis_data = np.array(axis_data)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
GuiMacielPereira commented 8 months ago

My goodness, well spotted. I'll fix that.

GuiMacielPereira commented 8 months ago