-
Notifications
You must be signed in to change notification settings - Fork 122
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
11422 allow x to the n scaling in plots #13367
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DanNixon
added a commit
that referenced
this pull request
Aug 14, 2015
…caling_in_plots 11422 allow x to the n scaling in plots
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #11422
A "power" option is added to the "Scale" tab of the "General Plot Options" window. Selecting it enables entry of exponent value "n". For example, n=2 corresponds to a quadratic axis scale, whilst n=-1 corresponds to a reciprocal scale. Both negative and non-integer values of n are permitted.
It is mostly left to the user to choose a sensible combination of axis limits, data to plot, and value of n. Some situations which may be more commonly met, such as having an axis limit at 0 but having a diverging scale length at 0, are resolved automatically by plotting only to near 0 (0.01 times the other axis limit). However, other situations may lead to apparently blank plots, which is consistent with what happens if you try to plot negative data on a logarithmic scale.
A warning is visible to the user in the GUI when "power" is selected, alerting them to ensure axis scaling and ranges are compatible. I believe this is preferable to reducing the versatility of the "power" option by restricting possible values of n.
For tester:
One method to test that scales are correct is to plot, for example, data with y = x^0.5 and then set the scale to quadratic and see that the curve now looks like a straight line.
When "power" is selected as scale type: