|
10 | 10 | set text(font: "Virgil 3 YOFF")
|
11 | 11 | cetz.canvas({
|
12 | 12 | import cetz.plot
|
13 |
| - import cetz.draw: content |
| 13 | + cetz.draw.set-style(axes: (shared-zero: false)) |
14 | 14 |
|
15 | 15 | plot.plot(
|
16 |
| - size: (3.5, 3), |
17 |
| - y-label: [state], |
18 |
| - x-label: [Time], |
| 16 | + size: (3, 3), |
19 | 17 | axis-style: "school-book",
|
| 18 | + y-label: [State], |
| 19 | + x-label: [Time], |
20 | 20 | x-tick-step: none,
|
21 | 21 | y-tick-step: none,
|
22 | 22 | x-min: 0,
|
23 | 23 | x-max: 500,
|
24 | 24 | x-grid: true,
|
25 | 25 | y-min: 0,
|
26 | 26 | y-max: 500,
|
27 |
| - legend: "legend.north", |
28 | 27 | {
|
29 | 28 | plot.add(
|
30 |
| - ((75, 75), (450, 300)), |
| 29 | + ((75, 75), (450, 500)), |
31 | 30 | mark: "o",
|
| 31 | + mark-style: (stroke: blue, fill: white), mark-size: .1, |
32 | 32 | )
|
33 | 33 | plot.add(
|
34 | 34 | ((75, 50), (450, 125)),
|
35 | 35 | mark: "o",
|
36 | 36 | style: (stroke: (paint: red, dash: "dashed")),
|
| 37 | + mark-style: (stroke: red, fill: white), mark-size: .1, |
37 | 38 | )
|
38 | 39 | },
|
39 | 40 | )
|
|
49 | 50 | set text(font: "Virgil 3 YOFF")
|
50 | 51 | cetz.canvas({
|
51 | 52 | import cetz.plot
|
52 |
| - import cetz.draw: * |
| 53 | + cetz.draw.set-style(axes: (shared-zero: false)) |
53 | 54 |
|
54 | 55 | plot.plot(
|
55 |
| - size: (3.5, 3), |
| 56 | + size: (3, 3), |
56 | 57 | y-label: [State],
|
57 | 58 | x-label: [Time],
|
58 | 59 | axis-style: "school-book",
|
| 60 | + legend-style: ( |
| 61 | + default-position: "legend.north", |
| 62 | + stroke: none, |
| 63 | + ), |
59 | 64 | x-tick-step: none,
|
60 | 65 | y-tick-step: none,
|
61 | 66 | x-min: 0,
|
62 | 67 | x-max: 500,
|
63 | 68 | x-grid: true,
|
64 | 69 | y-min: 0,
|
65 | 70 | y-max: 500,
|
66 |
| - legend: "legend.north", |
67 | 71 | {
|
68 | 72 | plot.add(
|
69 |
| - ((75, 75), (450, 300)), |
70 |
| - style: (stroke: (paint: blue)), |
| 73 | + ((75, 125), (450, 300)), |
| 74 | + style: (stroke: (paint: red, dash: "dashed")), |
| 75 | + mark-style: (stroke: red, fill: white), mark-size: .1, |
71 | 76 | mark: "o",
|
72 |
| - label: "actual", |
| 77 | + label: "Target", |
73 | 78 | )
|
74 | 79 | plot.add(
|
75 | 80 | ((75, 500), (450, 325)),
|
| 81 | + style: (stroke: (paint: blue), mark: (fill: blue, stroke: blue)), |
| 82 | + mark-style: (stroke: blue, fill: white), mark-size: .1, |
76 | 83 | mark: "o",
|
77 |
| - label: "target", |
78 |
| - style: (stroke: (paint: red, dash: "dashed")), |
| 84 | + label: "Actual", |
79 | 85 | )
|
80 | 86 | },
|
81 | 87 | )
|
|
91 | 97 | set text(font: "Virgil 3 YOFF")
|
92 | 98 | cetz.canvas({
|
93 | 99 | import cetz.plot
|
94 |
| - import cetz.draw: * |
| 100 | + cetz.draw.set-style(axes: (shared-zero: false)) |
95 | 101 |
|
96 | 102 | plot.plot(
|
97 |
| - size: (3.5, 3), |
| 103 | + size: (3, 3), |
98 | 104 | y-label: [State],
|
99 | 105 | x-label: [Time],
|
100 | 106 | axis-style: "school-book",
|
|
110 | 116 | plot.add(
|
111 | 117 | ((75, 75), (450, 300)),
|
112 | 118 | mark: "o",
|
| 119 | + mark-style: (stroke: blue, fill: white), mark-size: .1, |
113 | 120 | )
|
114 | 121 | plot.add(
|
115 | 122 | ((75, 50), (450, 275)),
|
116 | 123 | mark: "o",
|
117 | 124 | style: (stroke: (paint: red, dash: "dashed")),
|
| 125 | + mark-style: (stroke: red, fill: white), mark-size: .1, |
118 | 126 | )
|
119 | 127 | },
|
120 | 128 | )
|
|
0 commit comments