Skip to content
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

Lots of white space between geoaxes #268

Open
tiemvanderdeure opened this issue Aug 22, 2024 · 3 comments
Open

Lots of white space between geoaxes #268

tiemvanderdeure opened this issue Aug 22, 2024 · 3 comments

Comments

@tiemvanderdeure
Copy link

When I plot into a matrix of 'GeoAxis`, my maps become tiny with lots of white space between my axes. It seems that the row gap is the culprit rather than the column gap.

The quick fix is to call something like rowgap!(fig.layout, -30).

A quick example:

using CairoMakie, GeoMakie
fig = Figure()
for i in 1:2, j in 1:2
    ga = GeoAxis(fig[i,j], limits = (-30,55,-50,80))
    poly!(ga, land)
end

fig

which comes out like this:
geomakieissue

@asinghvi17
Copy link
Member

Will take a look, maybe we are overreporting protrusion...

@dmetivie
Copy link

dmetivie commented Sep 4, 2024

Similarly

n_rows = 1
n_cols = 4
maps = [rand(5,5) .* (i_row * 10 + i_col) for i_row in 1:n_rows, i_col in 1:n_cols]
# get global extrema
extremas = map(extrema, maps)
global_min = minimum(t->first(t), extremas)
global_max = maximum(t->last(t), extremas)
# these limits have to be shared by the maps and the colorbar
clims = (global_min, global_max)

let
	fig = GeoMakie.Figure()
	for i_row in 1:1, i_col in 1:n_cols
		ax =  GeoMakie.GeoAxis(fig[i_row, i_col])
		GeoMakie.heatmap!(ax, maps[i_row, i_col]; colorrange=clims)
	end
	cb = GeoMakie.Colorbar(fig[:, n_cols + 1]; limits=clims)
	fig
end

image
while with regular Axis it works as expected

@asinghvi17
Copy link
Member

Hmm, this might be a result of the protrusions, but I'm not sure. Will have to resurrect some old code to check, the solution might be to just implement tight_ticklabel_spacing for GeoAxis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants