Attributes (in particular width) of the colorbar in Plots.jl

How do I change the attributes of the colorbar in Plots? In particular I would like to change the width and change the location, s.t. it is directly next to the corresponding plot.

Thanks in advance.

Can you provide a small example of what your plot currently looks like together with the code that generated the plot? It would make it easier to answer your question.

1 Like

Sure.

using Plots

x=rand(10)
y=rand(10)
zvals=rand(10)

scatter(x,y,
    xguidefontsize=18, yguidefontsize=18,
    label = "",
    size = (700,400),
    #colorbar =:best,
    marker_z = zvals,
    seriescolor=:cividis,
    markersize = 10,
    tickfontsize = 14,
)

the colorbar = may be used to change the location of the colorbar.