mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
211 stars 124 forks source link

Plot options for surface plots from group workspaces #14739

Closed tom-perkins closed 8 years ago

tom-perkins commented 8 years ago

Follows on from issue #14461, which added a right-click option to create a surface plot from a workspace group:

The linked Python files in the comment below show what the desired output should look like.

tom-perkins commented 8 years ago

The issue when the plot is produced, but is empty, occurs when the group contains only 2 workspaces (like POLREF00014966). Can replicate by creating a group with 2 sample workspaces and plotting.

The context menu option should be shown whenever the workspace clicked can be cast to a const WorkspaceGroup. I can't replicate the case when it is not shown.

tom-perkins commented 8 years ago

Performance: creating empty workspace and filling is much faster than using CreateWorkspace algorithm or plotting from a table. Tested on a group of 100 workspaces, each with 5000 points per spectra - took a few seconds to plot (~6), almost all of which was spent in the QtiPlot plotting code (plotGraph3D).

tom-perkins commented 8 years ago

These files were sent by Pascal Manuel as examples of the desired output (they work on the data in Dropbox). From his email:

As highlighted in my previous email, some workspaces are histo (this would be the case of a normal workspace) and some are centre bins (if you reload gss files). The algorithm should be clever enough to decide which type you want to plot and modify accordingly (this is the reason for the np.histogram in the files atached).

tom-perkins commented 8 years ago

@OwenArnold Adding so you can see the issue

tom-perkins commented 8 years ago

examplesurface Left: QtiPlot, right: Pyplot Using colormap "Jet" and AddSampleLog to add log data, and ConvertToPointData on loading as described in email.