-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from JamesxX/agressive-refactor
Aggressive refactoring
- Loading branch information
Showing
126 changed files
with
2,970 additions
and
5,460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#import "/doc/util.typ": * | ||
#import "/doc/example.typ": example | ||
#import "/doc/style.typ" as doc-style | ||
#import "/src/lib.typ": * | ||
#import "/src/cetz.typ": * | ||
#import "@preview/tidy:0.2.0" | ||
|
||
|
||
// Usage: | ||
// ```example | ||
// /* canvas drawing code */ | ||
// ``` | ||
#show raw.where(lang: "example"): example | ||
#show raw.where(lang: "example-vertical"): example.with(vertical: true) | ||
|
||
#make-title() | ||
|
||
#set terms(indent: 1em) | ||
#set par(justify: true) | ||
#set heading(numbering: (..num) => if num.pos().len() < 4 { | ||
numbering("1.1", ..num) | ||
}) | ||
#show link: set text(blue) | ||
|
||
// Outline | ||
#{ | ||
show heading: none | ||
columns(2, outline(indent: true, depth: 3)) | ||
pagebreak(weak: true) | ||
} | ||
|
||
#set page(numbering: "1/1", header: align(right)[CeTZ-Plot]) | ||
|
||
= Introduction | ||
|
||
CeTZ-Plot is a simple plotting library for use with CeTZ. | ||
|
||
= Usage | ||
|
||
This is the minimal starting point: | ||
#pad(left: 1em)[```typ | ||
#import "@preview/cetz:0.2.2" | ||
#import "@preview/cetz-plot:0.1.0" | ||
#cetz.canvas({ | ||
import cetz.draw: * | ||
import cetz-plot: * | ||
... | ||
}) | ||
```] | ||
Note that plot functions are imported inside the scope of the `canvas` block. | ||
All following example code is expected to be inside a `canvas` block, with the `plot` | ||
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") { | ||
doc-style.parse-show-module("/src/plot/" + m + ".typ") | ||
} | ||
|
||
= Chart | ||
|
||
#doc-style.parse-show-module("/src/chart.typ") | ||
#for m in ("barchart", "boxwhisker", "columnchart", "piechart") { | ||
doc-style.parse-show-module("/src/chart/" + m + ".typ") | ||
} |
Binary file not shown.
Oops, something went wrong.