Skip to content

hidedecorations! for PolarAxis does not take protrusions into account #4822

@grero

Description

@grero
  • [ x ] what version of Makie are you running? (]st -m Makie)
]st -m Makie
Status `~/Documents/programming/julia/MakiePolarTest/Manifest.toml`
  [ee78f7c6] Makie v0.22.1
  • [ x ] can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie)

  • [ x ] What platform + GPU are you on?
    Apple M1 Ultra macOS 15.0.1

MWE:

using Makie
using CairoMakie

function polar_test()
  r = 0.1 .+ randn(20)
  a = 2*pi*rand(20)
  fig = Figure(size=(600,300))
  ax1 = PolarAxis(fig[1,1])
  scatter!(ax1, a, r)
  hidedecorations!(ax1)
  ax1.thetagridvisible[] = true
  ax1.rgridvisible[] = true
  b1 = Box(fig[1, 1]; color = (:red, 0.3))

  ax2 = PolarAxis(fig[1,2])
  ax2.rticklabelsize[] = 0
  ax2.thetaticklabelsize[] = 0
  scatter!(ax2, a, r)
  b2 = Box(fig[1, 2]; color = (:red, 0.3))
  resize_to_layout!(fig)
fig
end

polar_test()

Image

In the left panel, hidedecorations! does not cause the axis to fill all available space, while in the right, explicitly setting the r and theta ticklabelsizes to 0 achieves the desired effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions