Ticket #3246 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Waterfall Plot: Does not look right with logarithmic binning.

Reported by: Janik Zikovsky Owned by: Russell Taylor
Priority: minor Milestone: Release 2.1
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Andrei Savici

Description

Refs #3139.

Change History

comment:1 Changed 9 years ago by Russell Taylor

This is unfortunately not entirely straightforward to rectify. The way things are implemented is to apply an constant offset to all the data values in a curve, which for linear axes is of course the same as a constant offset in pixels/distance. For logarithmic axes, this will lead to a distorted shape. It would be easy if there existed a function in QwtPlotCurve to apply a fixed pixel offset to an entire curve, but I don't see anything like this.

This is soluble - you would have to calculate the offset for every single point. I imagine this would not present a performance problem, but is it worth the bother for a niche aspect of a niche plot type?

The best outcome would be if the qtiplot developer would fix it (as this issue exists there as well)!

comment:2 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:3 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 32 to Iteration 33

Moved to iteration 33 at iteration 32 code freeze

comment:4 Changed 9 years ago by Russell Taylor

Comments from duplicate ticket #4977:

Creating a waterfall plot and then changing the Y-scale to logs causes only the first curve to be updated. However, after resizing the plot all of the other curves are updated.

There is also an issue with using the offset dialog. It uses percentages which don't work very well in a log scale. A constant multiplier would be better if the axis is set to log.

comment:5 Changed 9 years ago by Russell Taylor

  • Status changed from new to accepted

comment:6 Changed 9 years ago by Russell Taylor

Re #3246. Waterfall plots fill down to min value of first curve.

This is when 'Enable fill' is on. This seems more logical than each curve just filling down to its own minimum value. This also means the fill is right if the curves have negative values (previously it filled above the curve in this case).

Changeset: ecf4402e4acfb017be0191c89c9d2c698e7259ce

comment:7 Changed 9 years ago by Russell Taylor

Re #3246. Remove redundant 'Apply' button from offsets dialog.

This relates to waterfall plots. The plot updates as soon as the offset values are changed so having the 'Apply' button is pointless.

Changeset: ef598662ed8fcb5b4a1f14d47011141fba70a3fe

comment:8 Changed 9 years ago by Russell Taylor

Re #3246. Re-jig waterfall plot internals to shift curve by pixels...

...rather than by data point value. Means that things look better if changing to a log axis.

Changeset: fb10db1fff0a2cecc63de2b784a6344b53690558

comment:9 Changed 9 years ago by Russell Taylor

Re #3246. Disallow negative offsets in waterfall plots.

Changeset: 177612bb75d2d92faebca6085fc0d9bcb338cf8d

comment:10 Changed 9 years ago by Russell Taylor

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

This turned out to be easier to implement than initially foreseen thanks to the existence of the QPainter::translate() method.

I added some comments to the wiki page at http://www.mantidproject.org/MantidPlot:_Waterfall_Plots clarifying a few points about how these plots work.

I haven't observed - either before or after the latest changes - the issue commented on above about only the first curve updating when changing to a log axis.

comment:11 Changed 8 years ago by Andrei Savici

  • Status changed from verify to verifying
  • Tester set to Andrei Savici

comment:12 Changed 8 years ago by Andrei Savici

  • Status changed from verifying to closed

Works, but gets into trouble when one spectra is all zeros.

comment:13 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4093

Note: See TracTickets for help on using tickets.