Skip to content

Commit

Permalink
Documentation update (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-wolf authored Jan 9, 2025
2 parents 03657ab + 73b2f82 commit fb62023
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
Binary file modified manual.pdf
Binary file not shown.
26 changes: 25 additions & 1 deletion manual.typ
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// Outline
#{
show heading: none
columns(2, outline(indent: true, depth: 3))
columns(2, outline(indent: auto, depth: 3))
pagebreak(weak: true)
}

Expand Down Expand Up @@ -54,13 +54,37 @@ module imported into the namespace.
= Plot

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

#for m in ("line", "bar", "boxwhisker", "contour", "errorbar", "annotation", "formats", "violin", "legend") {
doc-style.parse-show-module("/src/plot/" + m + ".typ")
}

== Styling
You can use style root `axes` with the following keys:
#doc-style.parse-show-module("/src/axes.typ")

=== Example
```example
import cetz.draw: *
import cetz-plot: *
set-style(axes: (
stroke: (dash: "dotted", paint: gray),
x: (mark: (start: ">", end: ">"), padding: 1),
y: (mark: none),
tick: (stroke: gray + .5pt),
))
plot.plot(size: (5, 4), axis-style: "school-book", y-tick-step: none, {
plot.add(calc.sin, domain: (0, calc.pi * 2))
})
```

= Chart

#doc-style.parse-show-module("/src/chart.typ")
#for m in ("barchart", "boxwhisker", "columnchart", "piechart", "pyramid") {
doc-style.parse-show-module("/src/chart/" + m + ".typ")
}

6 changes: 3 additions & 3 deletions src/axes.typ
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
/// #show-parameter-block("label.offset", "number", [Distance to move axis labels away from the axis.])
/// #show-parameter-block("label.anchor", "anchor", [Anchor of the axis label to use for it's placement.])
/// #show-parameter-block("label.angle", "angle", [Angle of the axis label.])
/// #show-parameter-block("axis-layer", "float", [Layer to draw axes on (see @@on-layer() )])
/// #show-parameter-block("grid-layer", "float", [Layer to draw the grid on (see @@on-layer() )])
/// #show-parameter-block("background-layer", "float", [Layer to draw the background on (see @@on-layer() )])
/// #show-parameter-block("axis-layer", "float", [Layer to draw axes on (see cetz' `on-layer`)])
/// #show-parameter-block("grid-layer", "float", [Layer to draw the grid on (see cetz' `on-layer`)])
/// #show-parameter-block("background-layer", "float", [Layer to draw the background on (see cetz' `on-layer`)])
/// #show-parameter-block("padding", "number", [Extra distance between axes and plotting area. For schoolbook axes, this is the length of how much axes grow out of the plotting area.])
/// #show-parameter-block("overshoot", "number", [School-book style axes only: Extra length to add to the end (right, top) of axes.])
/// #show-parameter-block("tick.stroke", "stroke", [Major tick stroke style.])
Expand Down

0 comments on commit fb62023

Please sign in to comment.