-
Notifications
You must be signed in to change notification settings - Fork 1
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
Propose refactoring axes.typ
#23
Conversation
Ready for review, of note: |
@@ -54,7 +54,7 @@ module imported into the namespace. | |||
= Plot | |||
|
|||
#doc-style.parse-show-module("/src/plot.typ") | |||
#for m in ("line", "bar", "boxwhisker", "contour", "errorbar", "annotation", "formats") { | |||
#for m in ("line", "bar", "boxwhisker", "contour", "errorbar", "annotation",) { |
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.
Shouldn't we add /src/axes/format.typ
somewhere? Maybe also for the other axes
stuff, which was kind of “hidden” until now?
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.
Absolutely, I'll work on that tomorrow I think
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.
Ok so I'm looking at it and the plot documentation sufficiently describes relevant axes
functions that it would be verbose to add them twice. What I'd suggest is that we keep it hidden (or only show it in some sort of "advanced" documentation) because my gut feeling is that it would confuse people.
One nitpick I have with myself is that tick formatters do belong in axes
but they are only ever used as an argument for {n}-format
in plot.plot
- could we alias the tick formatters so they can be accessed through both plot
and axes
? Or would that set a bad precedent?
@@ -0,0 +1,153 @@ | |||
#import "/src/cetz.typ": util, draw, styles, vector | |||
#import "../style.typ": default-style, _prepare-style, _get-axis-style |
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.
There was some reason to use absolute paths, but idk. anymore…
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'll leave it in for a separate refactor to deal with as I don't feel I know enough to properly do that
(sorry about the spam) |
Converted to draft as this can be implemented more simply if a more aggressive refactor is undertaken first (in progress). |
When I was working on implementing log axes, I found myself having to navigate what felt like a single-file code spaghetti backwards and forwards, and thought that it was probably the right size to split into separate files.
Blocked by #21 and #18 (this PR will be updated to refactor them too)