Skip to content

Commit

Permalink
update manual and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesrswift committed Aug 1, 2024
1 parent 4dc325f commit 3a6b4e4
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 10 deletions.
58 changes: 49 additions & 9 deletions doc/util.typ
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#import "/src/lib.typ" as cetz-plot
#import "/src/cetz.typ"

/// Make the title-page
#let make-title() = {
Expand Down Expand Up @@ -33,30 +34,69 @@
set text(weight: "bold", left-color)
show link: set text(left-color)

block(
block({
place(
top + left,
dx: -left-fringe * 22cm + 5mm,
text(3cm, right-color)[CeTZ]
) +
)
text(3cm)[Plot]
)
block(
v(1cm) +
})

block({
v(1cm)
text(
20pt,
authors.map(v => link(v.at(1), [#v.at(0)])).join("\n")
)
)
block(
v(2cm) +
})
block({
v(2cm)
text(
20pt,
link(
url,
[Version ] + [#cetz-plot.version]
)
)
)
})

block({
v(2cm)
set text(fill: black)
cetz.canvas({
cetz-plot.plot(
size: (8,5),
x-tick-step: calc.pi / 4,
x-minor-tick-step: calc.pi / 16,
x-grid: "both",
x-min: 0, x-max: 2 * calc.pi,
x-format: cetz-plot.axes.format.multiple-of,

y-min: -1, y-max: 1, y-tick-step: 0.5, y-minor-tick-step: 0.1,
y-grid: "both",
{
cetz-plot.add.xy(
calc.sin,
domain: (0,2*calc.pi),
label: $y=x$,
line: "raw",
samples: 100,
epigraph: true,
)

cetz-plot.add.xy(
(t)=>calc.pow(calc.sin(t),2),
domain: (0, 2* calc.pi),
line: "raw",
samples: 100,
hypograph: true,
label: $sin^2 (x)$
)
}
)
})
})

pagebreak(weak: true)
}
Binary file added manual.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion src/plot/styles.typ
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
),
axis-layer: 2,
grid-layer: -1,
background-layer: 0,
background-layer: -2,
padding: 0,
tick: (
fill: none,
Expand Down
Binary file modified tests/plots/polar-2d/scatter/out/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plots/polar-2d/scatter/ref/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3a6b4e4

Please sign in to comment.