Skip to content

Instantly share code, notes, and snippets.

@ajdawson
Last active June 7, 2022 13:47
Show Gist options
  • Save ajdawson/dd536f786741e987ae4e to your computer and use it in GitHub Desktop.
Save ajdawson/dd536f786741e987ae4e to your computer and use it in GitHub Desktop.
Adding gridline labels to a cartopy Lambert Conformal projection plot
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hepengz
Copy link

hepengz commented Apr 13, 2021

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)

@marinadmo
Copy link

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