Skip to content

Commit 869f300

Browse files
committed
Add gridlines_[major|minor] GeoAxes property
1 parent 7808689 commit 869f300

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

proplot/axes/geo.py

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,10 +673,40 @@ def format(
673673
# Parent format method
674674
super().format(rc_kw=rc_kw, rc_mode=rc_mode, **kwargs)
675675

676+
@property
677+
def gridlines_major(self):
678+
"""
679+
The cartopy `~cartopy.mpl.gridliner.Gridliner`
680+
used for major gridlines or a 2-tuple containing the
681+
(longitude, latitude) major gridlines returned by
682+
basemap's `~mpl_toolkits.basemap.Basemap.drawmeridians`
683+
and `~mpl_toolkits.basemap.Basemap.drawparallels`.
684+
This can be used for customization and debugging.
685+
"""
686+
if self._name == 'basemap':
687+
return (self._lonlines_major, self._latlines_major)
688+
else:
689+
return self._gridlines_major
690+
691+
@property
692+
def gridlines_minor(self):
693+
"""
694+
The cartopy `~cartopy.mpl.gridliner.Gridliner`
695+
used for minor gridlines or a 2-tuple containing the
696+
(longitude, latitude) minor gridlines returned by
697+
basemap's `~mpl_toolkits.basemap.Basemap.drawmeridians`
698+
and `~mpl_toolkits.basemap.Basemap.drawparallels`.
699+
This can be used for customization and debugging.
700+
"""
701+
if self._name == 'basemap':
702+
return (self._lonlines_minor, self._latlines_minor)
703+
else:
704+
return self._gridlines_minor
705+
676706
@property
677707
def projection(self):
678708
"""
679-
The `~cartopy.crs.Projection` or `~mpl_toolkits.basemap.Basemap`
709+
The cartopy `~cartopy.crs.Projection` or basemap `~mpl_toolkits.basemap.Basemap`
680710
instance associated with this axes.
681711
"""
682712
return self._map_projection

0 commit comments

Comments
 (0)