-
Notifications
You must be signed in to change notification settings - Fork 6
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
Logarithm axes in plots library #21
Logarithm axes in plots library #21
Conversation
@@ -303,6 +303,9 @@ | |||
axis.min -= 1; axis.max += 1 | |||
} | |||
|
|||
axis.mode = get-axis-option(name, "mode", "lin") | |||
axis.base = get-axis-option(name, "base", 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine this could be useful for other things, like the ticks PR you have at the moment #18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we merge #18, you could pick the default formatter based on the axis options 👍.
The formatter itself does not know about the axis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
(This is a continuation of changes discussed in #3, #15)
As with previously, this is a draft PR, intended to share progress and collaborate on what is a highly sought-after feature.
This implementation adds axis optios {x}-mode that takes "lin" (default) or "log", which changes logic in
transform-vec
(along with a small refactor). Additionally, a differentcompute-ticks
heuristic is defined and applied, which now places major ticks on powers ofaxis.base
(default:10
), and placesn
logarithmically scaled minor ticks wheren
isint(axis.base / ticks.minor-step)
.