Plots.jl
Plots.jl copied to clipboard
[BUG] [GR] `marker_z` colours markers without considering `colorbar_scale`
Details
Changing the scaling of a colour bar with, e.g., colorbar_scale=:log10
only changes the scale of the colour bar but not the scale by which the markers are coloured. Therefore, the colours of the markers are misattributed in the colour bar (i.e. the colour bar is widely incorrect).
See the attached example images generated by the following code:
x = rand(10)
scatter(x, marker_z=1:10, ms=10)
scatter(x, marker_z=1:10, ms=10, colorbar_scale=:log10)
The markers are identically coloured in both plots even though the colour bars are scaled differently.
(Tested with GR and PlotlyJS. For the latter, colorbar_scale
has no effect at all.)
Backends
This bug occurs on ( insert x
below )
Backend | yes | no | untested |
---|---|---|---|
gr (default) | x | ||
pythonplot | x | ||
plotlyjs | |||
pgfplotsx | x | ||
unicodeplots | x | ||
inspectdr | x | ||
gaston | x |
Versions
Plots.jl version: v1.38.16
Backend version (]st -m <backend(s)>
): GR v0.72.7
Output of versioninfo()
: Julia Version 1.9.2
Commit e4ee485e909 (2023-07-05 09:39 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 8 × 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, tigerlake)
Threads: 8 on 8 virtual cores
Environment:
LD_LIBRARY_PATH = /home/lrb/intel/oneapi/mpi/2021.5.1//libfabric/lib:/home/lrb/intel/oneapi/mpi/2021.5.1//lib/release:/home/lrb/intel/oneapi/mpi/2021.5.1//lib:/home/lrb/intel/oneapi/debugger/2021.5.0/gdb/intel64/lib:/home/lrb/intel/oneapi/debugger/2021.5.0/libipt/intel64/lib:/home/lrb/intel/oneapi/debugger/2021.5.0/dep/lib:/home/lrb/intel/oneapi/compiler/2022.0.2/linux/lib:/home/lrb/intel/oneapi/compiler/2022.0.2/linux/lib/x64:/home/lrb/intel/oneapi/compiler/2022.0.2/linux/compiler/lib/intel64_lin::/home/lrb/Codes/cdf/cdfjava/lib:/home/lrb/Codes/cdf/lib
JULIA_EDITOR = code
JULIA_NUM_THREADS = 8
I can confirm that this bug affects the pgfplotsx backend as well