I’m putting together a fairly complicated figure, involving a mixture of line plots and polar histogram plots. Using PolarAxis
for the latter, I found that they appear to take up more space than needed. To illustrate the problem, I put together a simple example:
function polar_test()
θ = range(-π, stop=π, length=100)
r = 0.1 .+ rand(100)
fig = Figure()
lg1 = GridLayout(fig[1,1])
ax1 = PolarAxis(lg1[1,1])
scatter!(ax1, θ, r)
Makie.Box(lg1[1,1],color = (:red, 0.0), strokewidth = 1)
ax2 = Axis(lg1[1,2])
scatter!(ax2, θ, r)
Makie.Box(lg1[1,2],color = (:red, 0.0), strokewidth = 1)
lg2 = GridLayout(fig[2,1])
ax3 = PolarAxis(lg2[1,1], alignmode=Inside())
hidedecorations!(ax3)
scatter!(ax3, θ, r)
Makie.Box(lg2[1,1],color = (:red, 0.0), strokewidth = 1)
ax4 = Axis(lg2[1,2])
Makie.Box(lg2[1,2],color = (:red, 0.0), strokewidth = 1)
scatter!(ax4, θ, r)
hidedecorations!(ax4)
fig
end
polar_test()
For the normal Axis
object (right column) hiding the decorations allocates more space for the plot in the grid layout, but for the PolarAxis
(left column), the axis takes up the same amount of space. Is this a bug, or was it intended? Is there a quick fix to force the axis to take up the full space allotted to it by the layouting algorithm?