Cannot change colorbar position

I am trying to change the colorbar position:

using Plots
# pyplot()
plot(rand(10, 2), marker_z=rand(10), seriestype=:scatter, cb=:top)

But the colorbar position won’t move no matter how I specifiy :cb:

It is always on the right side of the image.

I tried using Plots and PyPlot backends, in terminal and IJulia both, which all didn’t work. All the package are up-to-date. Any ideas how may I achieve this? Thanks in advance.

1 Like

I am facing the same issue, any trick to go around this issue?

Positioning the colorbar can be tricky since some plotting packages do not support any position except to the right of the plot. But as one method, you can use PyPlot.jl directly and place the colorbar underneath the plot, e.g.,:

using PyPlot
fig, ax = plt.subplots(figsize=(4,4))
mesh = ax.pcolormesh(rand(10, 10))
fig.colorbar(mesh, orientation="horizontal")