Improvements for Python, Tables and Plotting

  1. Expose the functions so a Python algorithm can set columns of a table to “X”, “Y Error”, “Z”, etc. At present a newly created table (from ws=WorkspaceFactory.createTable() and then ws.addColumn() ) has all columns of type “Y” and after my algorithm has created and filled one in, I have to set column types manually before plotting the results.

  2. The table.addRow() function is rather picky about its argument: it only accepts a Dict or a List and rejects a Tuple or a numpy array for example. That goes against the spirit of Python.

  3. One plotting feature in Origin but missing from MantidPlot (and I suspect from QTIplot itself) is the ability to colour symbols in a 2D scatter plot according to another table column (via a colour map), or alternatively vary the symbol size. I can sort of do the colouring using 3D Scatter instead, and setting Orthogonal view directly down the z axis, but that is fiddly to get the axes lined up square on the page and there’s no ability to add error bars or overlay more than one data set.

I’ve created the following tickets for these

  1. Allow qtiplot Table column role to be set in python · Issue #13878 · mantidproject/mantid · GitHub
  2. Make extending qtiplot tables easier in python · Issue #13879 · mantidproject/mantid · GitHub
  3. Tables: Add symbol colour and size column roles · Issue #13880 · mantidproject/mantid · GitHub