Ticket #1040 (closed: fixed)

Opened 11 years ago

Last modified 5 years ago

plotSpectrum/plotTimeBin commands don't work in user scripts only in main window

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: major Milestone: Iteration 22
Component: Keywords:
Cc: Blocked By:
Blocking: Tester:

Description

Using either plotSpectrum/plotTimeBin in a user module no longer works.

For example

## module.py file ##

def doPlot():

plotSpectrum('ws',0)

## myscript.py ## This is the one in main window import module module.doPlot()

=> NameError on line 2: global name 'plotSpectrum' is not defined in file 'module.py' at line 2

Change History

comment:1 Changed 11 years ago by Nick Draper

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

comment:2 Changed 11 years ago by Martyn Gigg

(In [3996]) Split off plotSpectrum/plotBin functions into a separate 'mantidplot' module along with the rest of the qti import. This will allow qti functions to be used in imported scripts, as long as they are run from within MantidPlot. Re #1040

comment:3 Changed 11 years ago by Martyn Gigg

(In [4079]) SANS interface can now accept complex rebin strings for Q. Re #1153 Minor correction to mantidplot module so that old Layer code will work with the new module. Re #1040

comment:4 Changed 11 years ago by Martyn Gigg

  • Status changed from assigned to testing
  • Resolution set to fixed

comment:5 Changed 11 years ago by Roman Tolchenov

  • Status changed from testing to closed

comment:6 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 1888

Note: See TracTickets for help on using tickets.