MakieOrg / GeoMakie.jl

Geographical plotting utilities for Makie.jl
https://geo.makie.org
MIT License
167 stars 24 forks source link

bugs in `GeoMakie` xticklabel algorithm #137

Closed haakon-e closed 1 year ago

haakon-e commented 1 year ago

Consider:

julia> using GeoMakie, GLMakie

julia> fig = Figure(; resolution=(1200,700))

julia> ga11 = GeoAxis(fig[1,1]; coastlines = true, dest = "+proj=longlat");

julia> ga12 = GeoAxis(fig[1,2]; coastlines = true, dest = "+proj=longlat");

julia> ga21 = GeoAxis(fig[2,1]; coastlines = true, dest = "+proj=longlat", lonlims = (-170, -130), latlims = (0, 30));

julia> xlims!(ga12, -170, -130); ylims!(ga12, 0, 30)

julia> ga22 = GeoAxis(fig[2,2]; coastlines = true, dest = "+proj=longlat", lonlims = (-170, -130), latlims = (0, 30), xticklabelpad=50);
image
  1. Applying xlims!/ylims! after GeoAxis creation sometimes hides lonticks (top-right figure)
  2. Applying xticklabelpad on GeoAxis creation (or afterward) displaces lonticks horizontally, instead of vertically as is expected (bottom-right figure)
  3. Lonticks are overlapping with bottom spine in zoomed-in plots (bottom-left figure)

Top-left figure for reference -- everything looks good there :)


(makietest) pkg> st
Status `~/Documents/SOT/seismic/examples/inversion_on_real_data/makietest/Project.toml`
  [e9467ef8] GLMakie v0.7.3
  [db073c08] GeoMakie v0.4.6

julia> versioninfo()
Julia Version 1.8.2
Commit 36034abf260 (2022-09-29 15:21 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.3.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 1 on 4 virtual cores