Rotate axis y-label #66
-
Hi, is it possible to only rotate the y-label. I have found a way to rotate labels, but both x and y-labels are rotated. This is the code I have: #cetz.canvas({
import cetz.draw: *
set-style(axes: (
label: (angle: 90deg),
))
plot.plot(
size: (10, 10),
x-label: [x],
y-label: [y],
{
plot.add(domain: (0, 200), x => 220 - 1.2 * x)
},
)
}) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Yes, you can set different style values for different axes/sides by using Example: // --- >8 ---
set-style(axes:
(left: (label: (angle: 90deg))),
)
// --- 8< --- |
Beta Was this translation helpful? Give feedback.
-
Thanks! That works with the "scientific" axis-style, but when setting |
Beta Was this translation helpful? Give feedback.
-
Oh, I got it! In that case you have to do set-style(
axes: (
y: (
label: (angle: 90deg),
),
),
) So |
Beta Was this translation helpful? Give feedback.
Yes, you can set different style values for different axes/sides by using
left
,bottom
,right
,top
in theaxes: (...)
style dict.Example: