-
Notifications
You must be signed in to change notification settings - Fork 95
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
"Minor" longitude and latitude gridlines #27
Comments
Makes sense to me -- having labeled and unlabeld gridlines would be analogous to having "major" and "minor" ticklines. You could do something like |
FYI @lukelbd, it looks like the |
Hmm not sure that was ever a feature. Can you point to a commit? For now you can do this manually using the cartopy Gridliner. |
Oops I think I read your comment as if that was a hacky workaround with the current infrastructure. |
This is now in the master branch. Cartographic gridline properties are now controlled with the Also, gridline location specs like Here's an example from the website: # %%
import proplot as plot
fig, axs = plot.subplots(
[[1, 1, 2], [3, 3, 3]],
axwidth=4, proj={1: 'eqearth', 2: 'ortho', 3: 'wintri'},
wratios=(1, 1, 1.2), hratios=(1, 1.2),
)
axs.format(
suptitle='Projection axes formatting demo',
collabels=['Column 1', 'Column 2'],
abc=True, abcstyle='A.', abcloc='ul', abcborder=False, linewidth=1.5
)
# Styling projections in different ways
ax = axs[0]
ax.format(
title='Equal earth', land=True, landcolor='navy', facecolor='pale blue',
coastcolor='gray5', borderscolor='gray5', innerborderscolor='gray5',
gridlinewidth=1.5, gridcolor='gray5', gridalpha=0.5,
gridminor=True, gridminorlinewidth=0.5,
coast=True, borders=True, borderslinewidth=0.8,
)
ax = axs[1]
ax.format(
title='Orthographic', reso='med', land=True, coast=True, latlines=10, lonlines=15,
landcolor='mushroom', suptitle='Projection axes formatting demo',
facecolor='petrol', coastcolor='charcoal', coastlinewidth=0.8, gridlinewidth=1
)
ax = axs[2]
ax.format(
land=True, facecolor='ocean blue', landcolor='bisque', title='Winkel tripel',
lonlines=60, latlines=15,
gridlinewidth=0.8, gridminor=True, gridminorlinestyle=':',
) |
Is there any straight forward way to stride through what tick labels are shown in cartopy? Or could this be added as a feature?
This would be the equivalent of having
xticks=[0,5,10,15,20]
+xticklabels=['0', '', '10', '', '20']
for instance. The idea here is especially in longitude when labels get packed and overlapped at a reasonable font size for folks to see.This case doesn't have any issues, but imagine if you wanted the label size to be 14, 16, or 18 point font for a poster. All the lon labels overlap. Any way to show just 130W, 120W, 110W but maintain the grid structure? I figure there's a means to do it with the formatter/ticker, but I can't figure it out..
The text was updated successfully, but these errors were encountered: