Ticket #2653 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

Harmonise Mantidplot and qtiplot plotting commands

Reported by: Nick Draper Owned by: Russell Taylor
Priority: major Milestone: Release 2.0
Component: Python Keywords:
Cc: Blocked By:
Blocking: Tester: Janik Zikovsky

Description (last modified by Nick Draper) (diff)

There are some areas where we do not fit with the qitplot way of soing things around plotting data. and these could be simply fixed.

  1. Add a workspace command similar to the qtiplot table or matrix command. it should just link to
    mtd["ws"]
    
  2. Add the ability to specify the plot type to PlotSpectrum and PlotBin, using the Layers object.
  3. Adjust the plotSpectrum and plotBin commands to allow tuples as well as python lists (& alther the documentation to use tuples primarily).
  4. Intercept the qtiplot plot command to allow workspaces to be used as a source and then forward the call to PlotSpectrum.

Refs:

  1. QTIplot Handbook http://soft.proindependent.com/doc/manual-en/x6300.html#Python-Plots2D
  2. Mantidplot help http://www.mantidproject.org/MantidPlot:_1D_Plots_in_Python#Layers

Change History

comment:1 Changed 10 years ago by Nick Draper

  • Description modified (diff)

comment:2 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 28 to Iteration 29

Bulk move of tickets at the end of iteration 28

comment:3 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 29 to Iteration 30

"New" tickets moved at the code freeze of iteration 29

comment:4 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 30 to Iteration 31

Bulk move of tickets to iteration 31 at the iteration 30 code freeze

comment:5 Changed 9 years ago by Russell Taylor

  • Status changed from new to accepted

comment:6 Changed 9 years ago by Russell Taylor

Add workspace(name) command to MantidPlot python api. Re #2653 (point 1).

Changeset: dbbc1e3e1fe28e245f74a9dd2b8f1a6ea4860275

comment:7 Changed 9 years ago by Russell Taylor

Add workspace(name) command to MantidPlot python api. Re #2653 (point 1).

Changeset: dbbc1e3e1fe28e245f74a9dd2b8f1a6ea4860275

comment:8 Changed 9 years ago by Russell Taylor

Add the ability to specify the plot type from the 'plotSpectrum' command.

This refs #2653 (point 2a). The syntax is now: plotSpectrum(workspace,indices,errors,style), where style is a new optional argument that takes the same enumerations as the 'plot' command (see http://www.mantidproject.org/MantidPlot:_1D_Plots_in_Python#Plotting_from_a_Table), though note that only Layer.Line, Layer.Scatter, Layer.LineSymbols & Layer.VerticalSteps are supported (at present) for 'Mantid' curves. Note that there's also an issue with the symbol always being the same (see #4132).

Changeset: 630d606ed174f0e45bd2460939d6000ec18ee693

comment:9 Changed 9 years ago by Russell Taylor

Enhance qtiplot's 'plot' command to take a workspace + list of spectra.

This refs #2653 (point 4). If a workspace(proxy) is passed to the command it is forwarded to plotSpectrum. Otherwise, it is passed through to the qtiplot commands as before.

Changeset: c4a59c31bea8637efd4861ac694a0ad132e6420a

comment:10 Changed 9 years ago by Russell Taylor

Add the ability to specify the plot type from the 'plotBin' command.

This refs #2653 (point 2b). All types work - you can even make pie charts of a bin now! The plotBins command could really use tidying up though - it's very clunky.

Changeset: 2f568d6ceea09df8373cbdbf379cb48164c946e5

comment:11 Changed 9 years ago by Russell Taylor

Accept tuples as well as lists in the plotSpectrum & plotBin commands.

This refs #2653 (point 3).

Changeset: ff49239a681eb5315209f956ca072048e0dc7d6e

comment:12 Changed 9 years ago by Russell Taylor

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

comment:13 Changed 9 years ago by Janik Zikovsky

  • Status changed from verify to verifying
  • Tester set to Janik Zikovsky

comment:14 Changed 9 years ago by Janik Zikovsky

  • Status changed from verifying to closed

All 4 points confirmed. See also #4470.

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 3500

Note: See TracTickets for help on using tickets.