Hide axis labels

using WGLMakie


n = 500
x = 1:n
y = randn(n)
c = rand('a':'d', n)

spec = data((;x,y,c)) * visual(Scatter) * mapping(:x, :y, row=:c)
draw(spec, axis=(; ylabelvisible=false))

How can I hide each of these labels?

  • y
  • -2, 0, 2
  • a,b,c,d

For the y tick labels, just axis = (yticklabelsvisible=false,) should do it. The other two may be slightly less easy to do in a clean way.

ylabelvisible can definitely be made to work for the shared y label but yeah, I don’t think it does at the moment.

For facet labels, I imagine the cleanest solution is to support in AoG yfacetlabel.... attributes mirroring ylabel... attributes to customize it, so one would do axis = (yfacetlabelvisible=false,), but that also needs to be implemented. For now, facet labels take the styling (color, font, and size) from the axis title, which is a bit of a stopgap solution, they should probably have their own attributes.

Perhaps it’s good for the attribute names to mirror the mapping names, such as rowlabel.