Skip to content

Commit

Permalink
Rework Plot Axes (#479)
Browse files Browse the repository at this point in the history
Some cleanup of the axis drawing code. More refactoring should follow,
but in a follow-up PR.

Axis styling documentation is not good yet!
New features:
- Per axis coloring for scientific plots
- Axis padding for both scientific and school-book plots
- Axis "overshoot" for school-book plots
- Customizable axis, tick and grid z-layer
- One can disable the shared "0" tick

I am not happy with the shared "0" tick drawing, this should get
improved!
  • Loading branch information
johannes-wolf authored Feb 14, 2024
1 parent c02d976 commit 4b203d1
Show file tree
Hide file tree
Showing 29 changed files with 428 additions and 281 deletions.
7 changes: 5 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
- Open arcs are no longer modified for anchors, invalid border anchors will panic.
- Grids now actually support border anchors.

## Plot
- Fixed annotation bounds calculation
## Libs
### Plot
- The default style of plots changed
- New style keys for enabling/disabling the shared zero tick for "school-book" style plots
- New style keys for specifying the layer of different plot elements (`grid-layer`, `axis-layer`, `background-layer`)

## Misc
- The `hide` function now support an additional `bounds:` parameter to enable canvas bounds adjustment for hidden elements
Expand Down
4 changes: 3 additions & 1 deletion manual.typ
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,10 @@ Axis names to be used for styling:
- `bottom`: X-Axis
- `top`: X2-Axis

#doc-style.parse-show-module("/src/lib/axes.typ")

==== Default `scientific` Style
#raw(repr(axes.default-style))
#raw(repr(axes.default-style-scientific))

==== Default `school-book` Style
#raw(repr(axes.default-style-schoolbook))
Expand Down
Loading

0 comments on commit 4b203d1

Please sign in to comment.