Skip to content

Small Axis3 take a lot of place even without decorations #2259

@ederag

Description

@ederag

Reposted from discourse
The protrusions space is allocated even when decorations are hidden.

image
with CairoMakie v0.8.13

let
	fig = Figure(resolution=(700, 300))
	for i in 1:4
		ax1 = Axis3(fig[1, i])
		hidedecorations!(ax1)  # same place taken if this is commented out
		ax2 = Axis(fig[2, i])
		hidedecorations!(ax2)
	end
	fig
end

Setting protrusions to 0 or (0, 0, 0, 0) shrink the gaps, yielding the expected figure.
I would have expected hidedecorations! to do that automatically.

protrusions can not be fully automatic (as explained on discourse),
but maybe the presence of tick labels and/or axis label could be partially taken into account,
with separate hard-coded values for elements that belong to the protrusions, say

protrusions = (
 (xlabelvisible ? 15 : 0) + (xticklabelsvisible ? 15 : 0),
 ...
)

?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions