Last active
November 28, 2024 18:46
Adding gridline labels to a cartopy Lambert Conformal projection plot
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
FYI, labeling grid lines is now supported on any cartopy projection as of cartopy v0.18. See https://twitter.com/QuLogic/status/1257148289838911488
amazing!
Modifying gridlines:
ax.gridlines(xlocs=xticks, ylocs=yticks, draw_labels=False, linewidth=0.5, color='k', alpha=0.5, linestyle='--')
Modifying tic_params:
ax.tick_params(axis='both',labelsize=6,direction='out',right=False,top=False)
That worked great! Thanks!
I just received the warning indicated below, let me know if this has been updated!
:50: DeprecationWarning: The outline_patch property is deprecated. Use GeoAxes.spines['geo'] or the default Axes properties instead.
outline_patch = sgeom.LineString(ax.outline_patch.get_path().vertices.tolist())
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For the record, this works on stereographic projections as well. Thank you so much for this code... made the transition to NCL for a few things much cleaner.