Closed haakon-e closed 1 year ago
Thanks for the PR! I'll try to merge it later tonight. I do need to go through and recheck my math on this one - what's happening now is still somewhat wrong to me even after your patch, but that's probably fundamental to how I wrote this. (You might notice that the ticks are not all aligned the same even in the longlat projection).
fix xticklabelpad being applied in x-direction, not y-direction.
With the code provided in #137, I now get the output:
In bottom-left figure, xlabels are no longer overlapping with bottom spine. In bottom-right figure, xlabels are shifted down, as expected, but there seem to be some leftward shift resulting in slightly overlapping x-ticks. Unfortunately, this does not fix the top-right figure, where xlabel ticks are still missing.
This PR also fixes an issue where, if
xticklabelpad=0
,I would get this output:
but, with this PR, I get:
This is because we would divide by zero in
directional_pad
, resulting inNaN
positioning of ticks.I wouldn't claim this closes #137, since I'd still like for lonticks to appear in the top-right plot, but it's a step in the right direction.