Skip to content

Categorical colorbars always convert integers to floats for ticks #5559

@Datseris

Description

@Datseris
  • what version of Makie are you running? (]st -m Makie): 0.24.9
  • can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie) YES
  • What platform + GPU are you on? WINDOWS 10, NVIDIA
  • Which backend are you using? (GLMakie, CairoMakie, WGLMakie, RPRMakie): CairoMakie
  • Please provide an minimal example of the failing code. If the problem is with the visualization, please provide a picture or video of it.

From the docs https://docs.makie.org/stable/reference/blocks/colorbar#Experimental-Categorical-support , no matter what, the tick labels of the colorbar become floats.

using CairoMakie
fig, ax, pl = barplot(1:3; color=1:3, colormap=Makie.Categorical(:viridis))
Colorbar(fig[1, 2], pl, ticks = ([1,2,3], string.([1, 2, 3])))
fig

even though I explicitly set them to a totally different string than "1.0".

Image

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