Ticket #1231 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

Provide short cuts for log plots, error bars and distributions

Reported by: Steve Williams Owned by: Steve Williams
Priority: major Milestone: Iteration 23
Component: Keywords:
Cc: Blocked By:
Blocking: Tester:

Description

Add new right mouse click menu items:

scale-> log(Y)- liner(x), linear(Y)-log(x), log(Y)-log(x) errorbars-> error bars, no error bars count rates-> rates, integrated

Add a View->Preferences->2D Plot controls

Deal with 2D plots with colour scales

requested by Richard Heenan

Change History

comment:1 Changed 10 years ago by Steve Williams

  • Status changed from new to accepted

comment:2 Changed 10 years ago by Steve Williams

Things to do

  • create a new View->Preferences tab
    • learn how to edit the dialog using Qt classes _ _ _ _ _1 hour
    • design the interface and add controls _ _ _ _ _ _ _ _ _3 hours
    • get saving and loading settings working and tested _ _ 2 hours
    • all plot windows to load defaults for log scales, etc._3 hours
  • when adding data to an existing plot, make it have the same defaults
    • inherrit the log-linear nature of a plot _ _ _ _ _ _ _ 3 hours
    • inherrit the errorbar display setting _ _ _ _ _ _ _ _ _2 hours
    • inherrit distribution/non-distribution view _ _ _ _ _ _2 hours
  • Add units to the matrix view tabs
    • learning how to do this _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _1 hour
    • decide what to do with large unit names and implement _1 hour
    • test _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _0.5 hours
  • create plot as distribution functionality
    • convert existing plots to distribution view _ _ _ _ _ _4 hours
    • update the scale and axis legends _ _ _ _ _ _ _ _ _ _ _1 hour
    • all future drawing to the plot to be distribution _ _ _1 hour
    • create a equally spaced bin helper function _ _ _ _ _ _2 hours
    • create and test rules for displaying as distribution _ 2 hours
  • Add more right click menus for plots
    • including learning how to do this _ _ _ _ _ _ _ _ _ _ _0.5 hour
    • create the menus, link to their commands and test _ _ _3 hours
    • Get the menus to read in the defaults _ _ _ _ _ _ _ _ _1 hour
  • document distribution view
    • MantidPlot:_Help _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2 hour
    • Python help _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _1 hour

total 35 hours

comment:3 Changed 10 years ago by Steve Williams

Revision
Much of this ticket has been split into #1238 . This ticket is now:

  • Add more right click menus for plots
    • learning how to do this _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _0.5 hour
    • create the menus, link to their commands and test _ _ _3 hours
  • create a new View->Preferences tab
    • learn how to edit the dialog using Qt classes _ _ _ _ _ 1 hour
    • design the interface and add controls _ _ _ _ _ _ _ _ _3 hours
    • get saving and loading preferences working and tested 2 hours
    • all plot windows to load log-linear default on start _ _ 2 hours

total 11.5 hours

comment:4 Changed 10 years ago by Steve Williams

(In [4454]) Allowing log plots to be accessed more quickly re #1231

*Add more right click menus for plots (part complete):

*learning how to do this 1 hour (the code wasn't ours) *create the menus, link to their commands and test 4 hours

comment:5 Changed 10 years ago by Steve Williams

(In [4460]) A short cut for logarithmic color bars and axis on plots re #1231

comment:6 Changed 10 years ago by Steve Williams

took ~8 hours to do the following

  • create a new View->Preferences tab
    • learn how to edit the dialog using Qt classes _ _ _ _ _ 1 hour
    • design the interface and add controls _ _ _ _ _ _ _ _ _3 hours
    • get saving and loading preferences working and tested 2 hours
    • all plot windows to load log-linear default on start _ _ 2 hours

comment:7 Changed 10 years ago by Steve Williams

(In [4474]) It's now possible to set log scales as the default for plots from the View->Preference dialog re #1231

comment:8 Changed 10 years ago by Steve Williams

(In [4600]) Test this new feature on plots. You can rescale a plot using the Axes and Color Bar right click menu items. Next time you're looking at plots in Mantid try it out and send me tickets for any bugs you find. This ticket fixes the no numbers appearing on axes converted to log scale problem. re #1231

comment:9 Changed 10 years ago by Steve Williams

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

I spent another day on this because there were problems with the log scale showing the wrong area.

I spent another 1.5 days dealing with the situations where there are no numbers on log axes and investigating problems with color bars. I had to change the rescaling behavour for the change axis scale menu items and the Recale Menu Item. The code was confusing with some graph.cpp functions doing non-obvious things or nothing at all, it took me serval goes to do it. There are still problems with Color Bar.

comment:10 Changed 10 years ago by Steve Williams

  • Status changed from testing to reopened
  • Resolution fixed deleted

I've spent another 0.5 days dealing with a bug in the color bar. Some bugs still remain as in ticket #1265.

comment:11 Changed 10 years ago by Steve Williams

(In [4811]) In recent development versions colour plots were sometimes wrongly displaying uniform colour over the plot area despite the scale being OK. Problems still remain with the colour bar displaying mostly white, they are listed in ticket 1265, but I believe data aren't being misrepresented and functionality is improved. Things to watch when changing this code: there are Qtiplot, Mantidplot and possibly Qwt ways of doing the same thing, choose the Mantidplot way and watch for unexpected results. re #1231

comment:12 Changed 10 years ago by Steve Williams

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

The last commit took about 6 hours to code. The problem was that Qwt's isIntensityChanged() function doesn't always work. Also examined found problems with the QwtPlot::setAxisAutoScale() function and stopped my code from changing the scale twice when not necessary.

comment:13 Changed 10 years ago by Martyn Gigg

  • Status changed from testing to closed

comment:14 Changed 10 years ago by Steve Williams

Total development time about 40 hours

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2078

Note: See TracTickets for help on using tickets.