Refactoring #2093

GUI: create prototype of universal 1D, 2D plot machinery

Added by pospelov over 1 year ago.

Status:BacklogStart date:20 Jun 2018
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

For the moment we have IntensityDataItem and SpecularDataItem which are used to plot 1D and 2D results of simulation/fitting. This is done in a family of widgets (ScientificPlot and Co).
I see two problems in the code:

  • IntensityDataItem and SpecularDataItem carries the knowledge not only about the data to plot, but also about neutron scattering (Instrument, Q-space etc).
  • Lots of code are duplicated

For example, fit comparison widgets for specular simulation and profile widget for 2D GISAS do the same, but are implemented in very different way.

Within this item I suggest to write prototype of mini-machinery (family of SessionItem classes and corresponding views) intended only for scientific 1D and 2D plotting.
As soon as it is done, we will be able to rewrite out IntensityDataItems and Co in more decoupled way.

Here will be the list of items to implement in mini-framework.
  • 1D plot on canvas.
  • Many 1D plot on canvas, with different color, line type, title and the legend.
  • 1D plot on canvas with variable bin axis.
  • Color map for 2D data.
  • 2D data and its projections.
  • Synchronized axes between several plots.
  • To be extended...

Also available in: Atom PDF