MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.4k stars 307 forks source link

Changing x/y/z axis position in a `Axis3` #1056

Open Datseris opened 3 years ago

Datseris commented 3 years ago

Hi there, I'm making a plot that initially looks like this:

image

I've rotated the leftmost 3D axis because of better projection of the plotted object. However I'd prefer if the z axis decorations were on the left side. 2D axis has the options

xaxisposition = (i == 1 ? :top : :bottom),
yaxisposition = (j == 1 ? :left : :right))

from the tutorial.

Does something similar exist for 3D axis?

(yes, I do know I could apply some operations to rotate the plotted object, but that will make the rest of my code messy)

jkrumbiegel commented 3 years ago

the axis flipping is currently automatic given the angle, but I could introduce flags to set it manually

Datseris commented 3 years ago

Yes please, that would be really helpful!

ffreyer commented 1 month ago

Related: #325

ffreyer commented 1 month ago

I think this just requires adding some attributes here (defaulting to automatic probably) https://github.com/MakieOrg/Makie.jl/blob/2b5931ee92c00603a669d02b8103bff49315024b/src/makielayout/types.jl#L1489-L1786 and then changing this code https://github.com/MakieOrg/Makie.jl/blob/2b5931ee92c00603a669d02b8103bff49315024b/src/makielayout/blocks/axis3d.jl#L26-L39 to do what it's currently doing for automatic placement or pick true or false for custom placement