I’m attempting to inset a colorbar into the lower left corner of this graph using the example I found at the link below.
https://lazarusa.github.io/BeautifulMakie/ScattersLines/LineWithInset/
f1 = Figure(resolution = (800,800))
ax1 = Axis(f1)
hidespines!(ax1)
ax2 = Axis(f1, bbox = BBox(100,300,100,200))
hm1 = heatmap(ax1, transpose(dfm), colormap = cgrad(["white","green"],9))
ax1.yreversed = true
ax1.yaxisposition = :right
ax1.yticks = (2:3:length(labels),axisticks₁)
ax1.yticklabelsize = 10
ax1.xaxisposition = :top
ax1.xticks = (2:3:length(labels),axisticks₁)
ax1.xticklabelsize = 10
cbar = Colorbar(ax2,hm1, vertical = false, ticks = 0:0.20:1)
f1
Produces this error:
My prior code and result works fine (but can’t get the colorbar where I’d like it).
f1 = Figure(resolution = (800,800))
#ax1 = Axis(f1)
#ax2 = Axis(f1, bbox = BBox(100,300,100,200))
ax1, hm1 = heatmap(f1[1,1], transpose(dfm), colormap = cgrad(["white","green"],9))
hidespines!(ax1)
ax1.yreversed = true
ax1.yaxisposition = :right
ax1.yticks = (2:3:length(labels),axisticks₁)
ax1.yticklabelsize = 10
ax1.xaxisposition = :top
ax1.xticks = (2:3:length(labels),axisticks₁)
ax1.xticklabelsize = 10
#cbar = Colorbar(ax2,hm1, vertical = false, ticks = 0:0.20:1)
f1
I’m wondering if the code I was modeling my visualization has some deprecated aspects to it. Haven’t been able to locate in the documentation how to use bbox to place an inset otherwise.
Thanks for any help.
Jim