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

add: support for natural log scaling of the X & Y axes #302

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

xxxserxxx
Copy link
Contributor

This PR adds --x-scale-ln and --y-scale-ln to the plot command. If provided, the X &/| Y axes will be (natural) log scaled. This allows turning this:

plot-orig

into this:

plot-patch

@xxxserxxx
Copy link
Contributor Author

The first commit only added log scaling to the box graph; this was a miss. The second adds it to line and histogram as well.

@shenwei356 shenwei356 merged commit 29b40b8 into shenwei356:master Feb 19, 2025
@shenwei356
Copy link
Owner

Thanks! It's great!

shenwei356 added a commit that referenced this pull request Feb 19, 2025
@xxxserxxx
Copy link
Contributor Author

xxxserxxx commented Feb 19, 2025

@shenwei356 I suspect there's a way to tell plot to write labels for the bottom part of the axis -- note that it starts at the same value that it does unscaled, which means there are no ticks for over half the axis. I am unfamiliar with the plot package, though, and I'll have to look at it more to see if that's possible.

If you figure it out first, great! Otherwise, sooner or (probably) later I'll submit a PR for getting it to draw the early ticks on the scaled axis.

Thanks for the quick merge.

Edit:

oh, duh. There it is, right at the top: LogTicks. I'll mess with this and send a PR for it.

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.

None yet

2 participants