How do I offset titles in Plots.jl
? For example when the title overlaps with the colorbar
using Plots
pyplot()
heatmap(rand(100,100); title="title", titlefontsize=40, colorbar=:top)
produces something like
How do I offset titles in Plots.jl
? For example when the title overlaps with the colorbar
using Plots
pyplot()
heatmap(rand(100,100); title="title", titlefontsize=40, colorbar=:top)
produces something like
One common workaround in Plots.jl is to subplot:
using Plots; pyplot()
p1 = plot(title="title", titlefontsize=40, axis=nothing, framestyle=:none);
p2 = heatmap(rand(100,100), ratio=1);
plot(p1, p2, layout = grid(2, 1, heights=[-0.2, 1]), cb=:top)
NB:
You may want to further fine tune the relative heights
That is a neat solution. I used for my particular case annotate!
and some hacky x/y-coordinates. Thank you!