Skip to content

Handling of units in Axis3 #4963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fhagemann opened this issue May 9, 2025 · 0 comments · May be fixed by #4964
Open

Handling of units in Axis3 #4963

fhagemann opened this issue May 9, 2025 · 0 comments · May be fixed by #4964
Labels
enhancement Feature requests and enhancements

Comments

@fhagemann
Copy link

fhagemann commented May 9, 2025

Feature description

For Axis in 2D, there is an attribute dim1_conversion to set the default unit and decide whether the units should be displayed in the xticklabels or not:

using CairoMakie, Unitful
fig = Makie.Figure(size = (300,300))
ax = Makie.Axis(fig[1,1], dim1_conversion = Makie.UnitfulConversion(u"m", units_in_label = true))
Makie.current_figure()

Image

However, using the same syntax for Axis3 (dim1_conversion) which is also listed as attribute in the documentation of Axis3, this seems to be ignored:

using CairoMakie, Unitful
fig = Makie.Figure(size = (300,300))
ax = Makie.Axis3(fig[1,1], dim1_conversion = Makie.UnitfulConversion(u"m", units_in_label = true))
Makie.current_figure()

Image

Am I doing something wrong or is that feature missing?
I would expect the x-axis to also have m added to the numbers

@fhagemann fhagemann added the enhancement Feature requests and enhancements label May 9, 2025
@fhagemann fhagemann linked a pull request May 9, 2025 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests and enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant