Skip to content

Commit

Permalink
fix: add cetz-plot package and fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Dec 15, 2024
1 parent 7bfe0e4 commit 4fe46df
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
28 changes: 17 additions & 11 deletions resources/typst/configuration-management.typ
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{
set text(font: "Virgil 3 YOFF")
cetz.canvas({
import cetz.plot
cetz.draw.set-style(axes: (shared-zero: false))

plot.plot(
Expand All @@ -28,13 +27,15 @@
plot.add(
((75, 75), (450, 500)),
mark: "o",
mark-style: (stroke: blue, fill: white), mark-size: .1,
mark-style: (stroke: blue, fill: white),
mark-size: .1,
)
plot.add(
((75, 50), (450, 125)),
mark: "o",
style: (stroke: (paint: red, dash: "dashed")),
mark-style: (stroke: red, fill: white), mark-size: .1,
mark-style: (stroke: red, fill: white),
mark-size: .1,
)
},
)
Expand All @@ -49,7 +50,6 @@
{
set text(font: "Virgil 3 YOFF")
cetz.canvas({
import cetz.plot
cetz.draw.set-style(axes: (shared-zero: false))

plot.plot(
Expand All @@ -58,7 +58,7 @@
x-label: [Time],
axis-style: "school-book",
legend-style: (
default-position: "legend.north",
default-position: "north",
stroke: none,
),
x-tick-step: none,
Expand All @@ -72,14 +72,19 @@
plot.add(
((75, 125), (450, 300)),
style: (stroke: (paint: red, dash: "dashed")),
mark-style: (stroke: red, fill: white), mark-size: .1,
mark-style: (stroke: red, fill: white),
mark-size: .1,
mark: "o",
label: "Target",
)
plot.add(
((75, 500), (450, 325)),
style: (stroke: (paint: blue), mark: (fill: blue, stroke: blue)),
mark-style: (stroke: blue, fill: white), mark-size: .1,
style: (
stroke: (paint: blue),
mark: (fill: blue, stroke: blue),
),
mark-style: (stroke: blue, fill: white),
mark-size: .1,
mark: "o",
label: "Actual",
)
Expand All @@ -96,7 +101,6 @@
{
set text(font: "Virgil 3 YOFF")
cetz.canvas({
import cetz.plot
cetz.draw.set-style(axes: (shared-zero: false))

plot.plot(
Expand All @@ -116,13 +120,15 @@
plot.add(
((75, 75), (450, 300)),
mark: "o",
mark-style: (stroke: blue, fill: white), mark-size: .1,
mark-style: (stroke: blue, fill: white),
mark-size: .1,
)
plot.add(
((75, 50), (450, 275)),
mark: "o",
style: (stroke: (paint: red, dash: "dashed")),
mark-style: (stroke: red, fill: white), mark-size: .1,
mark-style: (stroke: red, fill: white),
mark-size: .1,
)
},
)
Expand Down
1 change: 1 addition & 0 deletions src/thesis/imports/preamble.typ
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
#import "@preview/xarrow:0.3.1": xarrow, xarrowSquiggly, xarrowTwoHead
#import "@preview/hydra:0.4.0": *
#import "@preview/cetz:0.3.1"
#import "@preview/cetz-plot:0.1.0": plot
#import "colors.typ": *
#import "workarounds.typ": *

0 comments on commit 4fe46df

Please sign in to comment.