-
Notifications
You must be signed in to change notification settings - Fork 8
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
Shared colorbar across several topoplots #324
Comments
Minimal working example: (I copied the code over from a Pluto notebook) using UnfoldMakie
using CairoMakie
using TopoPlots
data_1, positions = TopoPlots.example_data()
data_2 = data_1 .* 100
let
f = Figure()
plot_topoplot!(f[1,1], data_1[:,5,1], positions=positions)
plot_topoplot!(f[1,2], data_2[:,5,1], positions=positions)
current_figure()
end
min, max = minimum(data_2[:,5,1]), maximum(data_2[:,5,1])
let
f = Figure()
plot_topoplot!(f[1,1], data_1[:,5,1], positions=positions, visual=(; colorrange=(min,max)))
plot_topoplot!(f[1,2], data_2[:,5,1], positions=positions, visual=(; colorrange=(min,max)))
current_figure()
end The corresponding plots are: Versions:
|
For the initial example: Julia v1.11.2 , UnfoldMakie v0.5.13 |
@jschepers but why don't you use just conditional topoplot series? Just combine two datasets adn add column |
This could also be an option. |
Describe the bug
limits
tocolorrange
shows an error message asking us to use only one of these two since they are aliases - but we are using only one or the other..For now, we use the hacky solution
For now it's fine but I think in general it's rather error-prone because colorbar and plot are not connected at all.
Expected behavior
When setting a
colorrange
for the topoplots, I would have expected that the topoplot's colorbar is adjusted to this colorrange but it seems to be independent of it.In general, I would like to have a solution to have a shared colorbar for several (topo) plots but I'm not sure whether that is easily possible in Makie.
Screenshots

Versions:
The text was updated successfully, but these errors were encountered: