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

11422 allow x to the n scaling in plots #13367

Merged
merged 23 commits into from
Aug 14, 2015

Conversation

matthew-d-jones
Copy link
Contributor

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:

  • the warning message should be visible in the GUI, and
  • the value of n should be editable.

@DanNixon DanNixon self-assigned this Aug 14, 2015
DanNixon added a commit that referenced this pull request Aug 14, 2015
…caling_in_plots

11422 allow x to the n scaling in plots
@DanNixon DanNixon merged commit 5bcee6d into master Aug 14, 2015
@DanNixon DanNixon deleted the 11422_Allow_X_to_the_n_scaling_in_plots branch August 14, 2015 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow X^n scaling in plots
2 participants