Skip to content

Synching colorranges on the same axis? #912

@piever

Description

@piever

I've just noticed that it is a bit problematic to use a numeric color attributes in separate plots in the same axis.

For example, the following:

using CairoMakie

f = Figure()
ax = Axis(f[1, 1])
x1, y1, z1 = 1:10, 1:10, rand(10)
x2, y2, z2 = 11:20, 1:10, rand(10) .+ 100 
scatter!(ax, x1, y1, color = z1)
scatter!(ax, x2, y2, color = z2)
f

generates this figure

test

whereas IMO it should look something like this:

test2

That is to say, I imagine that the "colorrange" transform should be a property of the axis, pretty much like the x and y limits.

I'm not sure what is the best fix is in practice, maybe there could be some linkcolors! analogous to linkaxes!?

Metadata

Metadata

Assignees

No one assigned

    Labels

    MakieBackend independent issues (Makie core)enhancementFeature requests and enhancementsplanningFor discussion and planning development

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions