mantid icon indicating copy to clipboard operation
mantid copied to clipboard

Right-click plot formatting menus not updating plot in cut viewer

Open RichardWaiteSTFC opened this issue 2 years ago • 0 comments

Found during testing https://github.com/mantidproject/mantid/issues/34359 (thanks @Harrietbrown and team) and https://github.com/mantidproject/mantid/issues/34363

Describe the bug Right-click plot formatting menus (both individual axes menus and the main plot menu) do not update the 1D plot in cut viewer of the sliceviewer. It requires the figure to be re-drawn (e.g. on the cut being updated, or panning).

It may be easier to turn these menus off, the workspace plotted exists in the ADS and the user can plot it separately if formatting a figure for a publication

To Reproduce (1) make the data

md_4D = CreateMDWorkspace(Dimensions=4, Extents=[-2,2,-1,1,-1.5,1.5,-0.25,0.25], Names="H,K,L,E", Frames='HKL,HKL,HKL,General Frame',Units='r.l.u.,r.l.u.,r.l.u.,meV')
FakeMDEventData(InputWorkspace=md_4D, UniformParams='5e5') # 4D data
tmp = CreateMDWorkspace(Dimensions=4, Extents=[-0.5,0.5,-1,-0.5,-1.5,-1, -0.25,0], Names="H,K,L,E", Frames='HKL,HKL,HKL,General Frame',Units='r.l.u.,r.l.u.,r.l.u.,meV')
FakeMDEventData(InputWorkspace=tmp, UniformParams='1e5') # 4D data
md_4D += tmp
DeleteWorkspace(tmp)

# make a 3D MDEvent workspace by integrating over all E
md_3D = SliceMD(InputWorkspace='md_4D', AlignedDim0='H,-2,2,100', AlignedDim1='K,-1,1,100', AlignedDim2='L,-1.5,1.5,100')

(2) Open md_3D in the sliceviewer (3) Click the non-axis cut tool (4) Right-click on an axis and e.g. select grid lines (or log scale etc.) - grid lines won't immediately appear (5) Pan around in the 1D plot or move the cut representation - grid lines will appear

Expected behavior Plot would automatically update with new formatting (or no menu would exist)

Screenshots

Platform/Version (please complete the following information):

  • On windows I only see this on installed package found during testing, not when run main through pycharm (but @DanielMurphy22 can reproduce on ubuntu build)

RichardWaiteSTFC avatar Sep 16 '22 13:09 RichardWaiteSTFC