Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable autoscaling in ALC (and other) data plots #14719

Merged
merged 2 commits into from Dec 9, 2015

Conversation

tom-perkins
Copy link

Resolves #14048

Set autoscale to on in ALC, so that error bars are displayed correctly.

For Qwt's autoscaler to work correctly with the ErrorCurve Mantid widget, the function boundingRect() has to be overridden to provide the bounding rectangle of all points and error bars. The default from the base class is to return an invalid rectangle, so no autoscaling.

ErrorCurve is also used in other places in Mantid, for example multi dataset fitting.

To test:

  • Open Interfaces->Muon->ALC and load some data sets (for example HIFI00051636 - HIFI00051640 from the issue). Click Load and verify that the plot is scaled correctly. Compare to installed version of Mantid.
  • It would be good to check that the change has not broken other areas where the ErrorCurve is used, e.g. test multi dataset fitting to make sure the graphs there look ok too.

Set autoscale to on in setDataCurve, and override boundingRect() in the
ErrorCurve so that a new rect can be returned, taking account of the error
bars.

Qwt's autoscaler uses boundingRect(), which by default returns an invalid
rectangle (no autoscaling) but can be overridden to provide the bounding
rectangle of all points and errors.
@tom-perkins tom-perkins added Muon Issues and pull requests related to muons Component: GUI labels Dec 8, 2015
@tom-perkins tom-perkins added this to the Release 3.6 milestone Dec 8, 2015
@LamarMoore LamarMoore self-assigned this Dec 9, 2015
LamarMoore added a commit that referenced this pull request Dec 9, 2015
Enable autoscaling in ALC (and other) data plots
@LamarMoore LamarMoore merged commit 21026ce into master Dec 9, 2015
@LamarMoore LamarMoore deleted the 14048_ALC_scaling_errorbars branch December 9, 2015 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Muon Issues and pull requests related to muons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants