Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colorbar for bias plot sometime does not show all values #152

Open
ph-kev opened this issue Oct 30, 2024 · 1 comment
Open

Colorbar for bias plot sometime does not show all values #152

ph-kev opened this issue Oct 30, 2024 · 1 comment
Assignees

Comments

@ph-kev
Copy link
Member

ph-kev commented Oct 30, 2024

See the plot below with a colorbar range from (-0.0001, 0.0001)
Code_K5M95zsoxQ

However, the colorbar works as intended when it range from (-0.001, 0.001).
Code_WCazDeQtiE

@ph-kev ph-kev self-assigned this Nov 7, 2024
@ph-kev
Copy link
Member Author

ph-kev commented Nov 7, 2024

using CairoMakie

fig = Figure()

Axis(fig[1, 1])

centers_x = 1:5
centers_y = 6:10
data = reshape(range(-0.0001, 0.0001, 25), 5, 5)

heatmap_plot = heatmap!(fig[1,1], centers_x, centers_y, data)

# vertical colorbars
Colorbar(fig[1, 2], heatmap_plot, ticks = ([-0.0001, -8.0e-5, -6.0e-5, -4.0e-5, -2.0e-5, 0.0, 2.0e-5, 4.0e-5, 6.0e-5, 8.0e-5, 0.0001], ["-0.0001", "-8.0e-5", "-6.0e-5", "-4.0e-5", "-2.0e-5", "0.0", "2.0e-5", "4.0e-5", "6.0e-5", "8.0e-5", "0.0001"]))

display(fig)

See minimal working example above. If it is range(-0.00011, 0.00011, 25), then it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant