Skip to content

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

Merged
shenwei356 merged 2 commits into
shenwei356:masterfrom
xxxserxxx:master
Feb 19, 2025
Merged

shenwei356 merged 2 commits into
shenwei356:masterfrom
xxxserxxx:master

Conversation

@xxxserxxx

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Owner

Thanks! It's great!

shenwei356 added a commit that referenced this pull request Feb 19, 2025
@xxxserxxx

xxxserxxx commented Feb 19, 2025 •

Copy link
Copy Markdown
Contributor Author

@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.

2 participants