cartopy icon indicating copy to clipboard operation
cartopy copied to clipboard

Gridlines are drawn without showing ticks.

Open Curallin opened this issue 8 months ago • 2 comments

I often use ax.gridlines() to add coords info,but I can't make ticks shown like the figure below.

Image

Is it possible to adjust the following code to add axis ticks?

import cartopy.crs as ccrs
import matplotlib.pyplot as plt

fig,ax = plt.subplots(1,1,subplot_kw={'projection':ccrs.PlateCarree()})
ax.coastlines()
ax.set_global()
ax.stock_img()
ax.gridlines(draw_labels=True)

Image

Curallin avatar Apr 15 '25 15:04 Curallin

For rectangular projections, you can go ahead and use Matplotlib’s x- and y-ticks instead of the Gridliner. https://scitools.org.uk/cartopy/docs/latest/gallery/gridlines_and_labels/tick_labels.html#sphx-glr-gallery-gridlines-and-labels-tick-labels-py

rcomer avatar Apr 16 '25 07:04 rcomer

@rcomer Thanks.It would be nice if Gridliner had improvements in the future in terms of the ticker being displayed .

Curallin avatar Apr 16 '25 14:04 Curallin