Skip to content

Commit

Permalink
gallery: Update gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-wolf committed Nov 10, 2023
1 parent 8a4b22d commit 29dfea6
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
Binary file modified gallery/barchart.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 gallery/karls-picture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions gallery/karls-picture.typ
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

for (x, ct) in ((-1, $ -1 $), (-0.5, $ -1/2 $), (1, $ 1 $)) {
line((x, 3pt), (x, -3pt))
content((), anchor: "above", ct)
content((), anchor: "north", ct)
}

for (y, ct) in ((-1, $ -1 $), (-0.5, $ -1/2 $), (0.5, $ 1/2 $), (1, $ 1 $)) {
Expand All @@ -47,9 +47,9 @@
set-style(stroke: (thickness: 1.2pt))

line((30deg, 1), ((), "|-", (0,0)), stroke: (paint: red), name: "sin")
content("sin", text(red)[$ sin alpha $], anchor: "east")
content(("sin.start", .5, "sin.end"), text(red)[$ sin alpha $])
line("sin.end", (0,0), stroke: (paint: blue), name: "cos")
content("cos", text(blue)[$ cos alpha $], anchor: "north")
content(("cos.start", .5, "cos.end"), text(blue)[$ cos alpha $], anchor: "north")
line((1, 0), (1, calc.tan(30deg)), name: "tan", stroke: (paint: orange))
content("tan", $ text(#orange, tan alpha) = text(#red, sin alpha) / text(#blue, cos alpha) $, anchor: "west")
content("tan.end", $ text(#orange, tan alpha) = text(#red, sin alpha) / text(#blue, cos alpha) $, anchor: "west")
})
Binary file modified gallery/pie-chart.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 gallery/plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions gallery/plot.typ
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@

#set page(width: auto, height: auto, margin: .5cm)

#let style = (stroke: black, fill: rgb(0, 0, 200, 75))

#canvas(length: 1cm, {
plot.plot(size: (8, 6),
x-tick-step: none,
x-ticks: ((-calc.pi, $-pi$), (0, $0$), (calc.pi, $pi$)),
y-tick-step: 1,
{
plot.add(
style: plot.palette.blue,
domain: (-calc.pi, calc.pi), x => calc.sin(x * 1rad))
style: style,
domain: (-calc.pi, calc.pi), calc.sin)
plot.add(
hypograph: true,
style: plot.palette.blue,
domain: (-calc.pi, calc.pi), x => calc.cos(x * 1rad))
style: style,
domain: (-calc.pi, calc.pi), calc.cos)
plot.add(
hypograph: true,
style: plot.palette.blue,
domain: (-calc.pi, calc.pi), x => calc.cos((x + calc.pi) * 1rad))
style: style,
domain: (-calc.pi, calc.pi), x => calc.cos(x + calc.pi))
})
})
Binary file modified gallery/tree.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 29dfea6

Please sign in to comment.