-
-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add colorbar
title (on top/bottom)
#4387
Comments
Or create a |
colorbar already has a flip option which also flips the label, so that would also factor into it I guess |
That would be great! |
If you want to get around spacing issues, here's a solution for the interim: using CairoMakie, GeoMakie
fig = Figure(size = (400, 600))
a1, p1 = meshimage(fig[1, 1], -180..180, -90..90, rotr90(GeoMakie.earth()); axis = (; type = GeoAxis, dest = "+proj=moll"))
a2, p2 = meshimage(fig[2, 1], -180..180, -90..90, rotr90(GeoMakie.earth()); axis = (; type = GeoAxis, dest = "+proj=ortho"))
# now define the colorbar
cb_cell = fig[1:2, 2] = GridLayout() # treat the colorbar-and-label system as a single grid cell
rowgap!(cb_cell, 5) # set this or don't
cb = Colorbar(cb_cell[2, 1], #= ... =#)
cb_label = Label(cb_cell[1, 1], "hPa"; tellheight = true, tellwidth = false)
fig |
Feature description
It would be cool to have the option to place a
title
(orlabel
, not sure of the most appropriate name) on top (and why not bottom) of verticalcolorbar
. With Matplotlib I would useclb.ax.set_title
. This is useful for short title (like units).So far, the Julia community gave me two tricks on Zulip to do it in simple situation by adding a label manually on top
Label(fig[0,2], text = "Hello")
or creating an empty figure on top.However, in complex situation this does not work simply (I typically use GeoMakie.jl and due to spacing issues I have to use
rowgap!
which move the addedcolobar
title.In any case, a simple title option would be better. Not sure how it would work with horizontal
colorbar
.For plot types, please add an image of how it should look like
Here is an example with Matplotlib (and Cartopy), the
title
place thehPa
on top of thecolobar
.The text was updated successfully, but these errors were encountered: