Ticket #5847 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

python 'mergePlots' command is broken

Reported by: Russell Taylor Owned by: Martyn Gigg
Priority: critical Milestone: Release 2.3
Component: MantidPlot Keywords:
Cc: Blocked By:
Blocking: Tester: Nick Draper

Description

Try doing, e.g., plotBin(workspace('ws'),(0,1)) (which will call mergePlots underneath).

You will wind up with a graph with only the first curve on it.

Change History

comment:1 Changed 8 years ago by Russell Taylor

OK, this is specific to plotBin, because the qtiplot table that's backing up the curve gets deleted when the original graph window is closed in the mergePlots method. It might be better if the table 'belonged' to the curve rather than the window.

For this specific case, though, I think the best fix is to modify MantidUI::plotBin to take a list for bin numbers rather than calling it multiple times from python if more than one bin is given to the python function. This would leave the mergePlots issue as very much a corner case (I think mergePlots should be deprecated anyway).

comment:2 Changed 8 years ago by Nick Draper

  • Owner set to Martyn Gigg
  • Status changed from new to assigned

comment:3 Changed 8 years ago by Martyn Gigg

  • Status changed from assigned to accepted

comment:4 Changed 8 years ago by Martyn Gigg

Fix plotBin to use a list of bins directly. Refs #5847

Also raises an error for multiple workspaces that don't work at all. As the ticket suggests mergePlots needs deprecating and plot commands upgading to work with multiple sources correctly.

Changeset: 69cb0373ae29df9e861db4914d1879af4b0603e5

comment:5 Changed 8 years ago by Martyn Gigg

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:6 Changed 8 years ago by Nick Draper

  • Status changed from verify to verifying
  • Tester set to Nick Draper

comment:7 Changed 8 years ago by Nick Draper

  • Status changed from verifying to closed

Tested with the following plots

plotBin("GEM38370",(0,1,2,3,4))
plotBin("GEM38370",(1,2,3,4),True)

comment:8 Changed 8 years ago by Martyn Gigg

Fix plotBin to use a list of bins directly. Refs #5847

Also raises an error for multiple workspaces that don't work at all. As the ticket suggests mergePlots needs deprecating and plot commands upgading to work with multiple sources correctly.

Changeset: 69cb0373ae29df9e861db4914d1879af4b0603e5

comment:9 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6693

Note: See TracTickets for help on using tickets.