Skip to content

Commit

Permalink
docs: Some more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-wolf committed Dec 2, 2023
1 parent f68e671 commit 8335ca4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- **BREAKING** Rotation direction changed to CCW
- **BREAKING** Removed the `shadow` function
- **BREAKING** Changed the behaviour of `mark`
- **BREAKING** Changed the behaviour of `tranlate` by changing the transformation order, changed arguments of `scale` and `translate`
- Content padding has been improved to be configurable per side
- Groups support same padding options as content
- Mark offsetting has been fixed and improved
Expand Down
15 changes: 8 additions & 7 deletions src/lib/plot.typ
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
/// #show-parameter-block("min", ("auto", "float"), default: "auto", [
/// Axis lower domain value. If this is set greater than than `max`, the axis' direction is swapped])
/// #show-parameter-block("max", ("auto", "float"), default: "auto", [
/// Axis upper domain value. If this is set little than than `min`, the axis' direction is swapped])
/// Axis upper domain value. If this is set to a lower value than `min`, the axis' direction is swapped])
/// #show-parameter-block("equal", ("string"), default: "none", [
/// Set the axis domain to keep a fixed aspect ratio by multiplying the other axis domain by the plots aspect ratio,
/// depending on the other axis orientation (see `horizontal`).
Expand All @@ -79,8 +79,8 @@
/// #show-parameter-block("minor-tick-step", ("none", "float"), default: "none", [
/// Like `tick-step`, but for minor tick marks. In contrast to ticks, minor ticks do not have labels.])
/// #show-parameter-block("ticks", ("none", "array"), default: "none", [
/// A List o0 custom tick marks to additionally draw along the axis. They can be passed as
/// an array of `<floa>` values or an array of `(<float>, <content>)` tuples for
/// A List of custom tick marks to additionally draw along the axis. They can be passed as
/// an array of `<float>` values or an array of `(<float>, <content>)` tuples for
/// setting custom tick mark labels per mark.
///
/// #example(```
Expand All @@ -96,7 +96,7 @@
///
/// Examples: `(1, 2, 3)` or `((1, [One]), (2, [Two]), (3, [Three]))`])
/// #show-parameter-block("format", ("none", "string", "function"), default: "float", [
/// How to format the tick label: You can give a function that takes a `<float>` and returnu
/// How to format the tick label: You can give a function that takes a `<float>` and return
/// `<content>` to use as the tick label. You can also give one of the predefined options:
/// / float: Floating point formatting rounded to two digits after the point (see `decimals`)
/// / sci: Scientific formatting with $times 10^n$ used as exponet syntax
Expand Down Expand Up @@ -134,7 +134,7 @@
/// ])
///
/// - body (body): Calls of `plot.add` or `plot.add-*` commands. Note that normal drawing
/// commands like `line` or `rect` are not allowed insides the plots body, instead wrap
/// commands like `line` or `rect` are not allowed inside the plots body, instead wrap
/// them in `plot.add-annotation`, which lets you select the axes used for drawing.
/// - size (array): Plot size tuple of `(<width>, <height>)` in canvas units.
/// This is the plots inner plotting size without axes and labels.
Expand Down Expand Up @@ -427,8 +427,9 @@
/// Both values can have the special values "min" and
/// "max", which resolve to the axis min/max value.
/// Position is in axis space defined by the axes passed to `axes`.
/// - axes (tuple): Name of the axes to use `("x", "y")`, note that both
/// axes must exist, as `add-anchors` does not create axes on demand.
/// - axes (tuple): Name of the axes to use `("x", "y")` as coordinate
/// system for `position`. Note that both axes must be used,
/// as `add-anchors` does not create them on demand.
#let add-anchor(name, position, axes: ("x", "y")) = {
((
type: "anchor",
Expand Down
10 changes: 5 additions & 5 deletions src/lib/plot/line.typ
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
/// graph. Uses the `mark` style key of `style` for drawing.
/// - mark-size (float): Mark size in cavas units
/// - data (array,function): Array of 2D data points (numeric) or a function
/// of the form `x => y`, where `x` is a value insides `domain`
/// of the form `x => y`, where `x` is a value in `domain`
/// and `y` must be numeric or a 2D vector (for parametric functions).
/// #example(```
/// import cetz.plot
Expand Down Expand Up @@ -270,8 +270,8 @@
),)
}

/// Add horizontal lines at one or more y-values. The lines start and end point
/// is at its axis bounds.
/// Add horizontal lines at one or more y-values. Every lines start and end points
/// are at their axis bounds.
///
/// #example(```
/// cetz.plot.plot(size: (2,2), x-tick-step: none, y-tick-step: none, {
Expand Down Expand Up @@ -320,8 +320,8 @@
),)
}

/// Add vertical lines at one or more x-values. The lines start and end point
/// is at its axis bounds.
/// Add vertical lines at one or more x-values. Every lines start and end points
/// are at their axis bounds.
///
/// #example(```
/// cetz.plot.plot(size: (2,2), x-tick-step: none, y-tick-step: none, {
Expand Down

0 comments on commit 8335ca4

Please sign in to comment.