Created
May 31, 2024 08:42
-
-
Save jkrumbiegel/6e6812d5cd7261f5b1128ff17a1eb2ab to your computer and use it in GitHub Desktop.
Makie mixed coordinate space text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f = Figure() | |
ax = Axis(f[1, 1]) | |
relative_y(ax, x, y_rel) = lift(ax.finallimits) do lims | |
y = lims.origin[2] + lims.widths[2] * y_rel | |
Point(x, y) | |
end | |
text!(ax, relative_y(ax, 50, 0.8), text = "50, 0.8", yautolimits = false) | |
text!(ax, relative_y(ax, 50, 0.2), text = "50, 0.2", yautolimits = false) | |
text!(ax, relative_y(ax, 70, 0.5), text = "70, 0.5", yautolimits = false, align = (:right, :center)) | |
f |
Author
jkrumbiegel
commented
May 31, 2024

Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment