@@ -1657,20 +1657,8 @@ def drawmapboundary(self,color='k',linewidth=1.0,fill_color=None,\
1657
1657
self ._fulldisk ):
1658
1658
limb = Ellipse ((self ._width ,self ._height ),2. * self ._width ,2. * self ._height )
1659
1659
if self .projection in ['ortho' ,'geos' ,'nsper' ,'aeqd' ] and self ._fulldisk :
1660
- ax .set_frame_on (False )
1661
1660
# elliptical region.
1662
- ax .add_patch (limb )
1663
- self ._mapboundarydrawn = limb
1664
- if fill_color is None :
1665
- limb .set_fill (False )
1666
- else :
1667
- limb .set_facecolor (fill_color )
1668
- limb .set_zorder (0 )
1669
- limb .set_edgecolor (color )
1670
- limb .set_linewidth (linewidth )
1671
- limb .set_clip_on (True )
1672
- if zorder is not None :
1673
- limb .set_zorder (zorder )
1661
+ ax .set_frame_on (False )
1674
1662
elif self .projection in _pseudocyl : # elliptical region.
1675
1663
ax .set_frame_on (False )
1676
1664
nx = 100 ; ny = 100
@@ -1694,72 +1682,35 @@ def drawmapboundary(self,color='k',linewidth=1.0,fill_color=None,\
1694
1682
lats = np .array (lats1 + lats2 + lats3 + lats4 ,np .float64 )
1695
1683
x , y = self (lons ,lats )
1696
1684
xy = list (zip (x ,y ))
1697
- limb = Polygon (xy ,edgecolor = color ,linewidth = linewidth )
1698
- ax .add_patch (limb )
1699
- self ._mapboundarydrawn = limb
1700
- if fill_color is None :
1701
- limb .set_fill (False )
1702
- else :
1703
- limb .set_facecolor (fill_color )
1704
- limb .set_zorder (0 )
1705
- limb .set_clip_on (True )
1706
- if zorder is not None :
1707
- limb .set_zorder (zorder )
1685
+ limb = Polygon (xy )
1708
1686
elif self .round :
1709
1687
ax .set_frame_on (False )
1710
1688
limb = Circle ((0.5 * (self .xmax + self .xmin ),0.5 * (self .ymax + self .ymin )),
1711
1689
radius = 0.5 * (self .xmax - self .xmin ),fc = 'none' )
1712
- ax .add_patch (limb )
1690
+ else : # all other projections are rectangular.
1691
+ ax .set_frame_on (True )
1692
+ for spine in ax .spines .values ():
1693
+ spine .set_linewidth (linewidth )
1694
+ spine .set_edgecolor (color )
1695
+ if zorder is not None :
1696
+ spine .set_zorder (zorder )
1697
+ if self .projection not in ['geos' ,'ortho' ,'nsper' ]:
1698
+ limb = ax .axesPatch
1699
+
1700
+ if limb is not None :
1701
+ if limb is not ax .axesPatch :
1702
+ ax .add_patch (limb )
1713
1703
self ._mapboundarydrawn = limb
1714
1704
if fill_color is None :
1715
1705
limb .set_fill (False )
1716
1706
else :
1717
1707
limb .set_facecolor (fill_color )
1718
1708
limb .set_zorder (0 )
1719
- limb .set_clip_on (True )
1709
+ limb .set_edgecolor (color )
1710
+ limb .set_linewidth (linewidth )
1720
1711
if zorder is not None :
1721
1712
limb .set_zorder (zorder )
1722
- else : # all other projections are rectangular.
1723
- # use axesPatch for fill_color, spine for border line props.
1724
- for spine in ax .spines .values ():
1725
- spine .set_linewidth (linewidth )
1726
- if self .projection not in ['geos' ,'ortho' ,'nsper' ]:
1727
- limb = ax .axesPatch
1728
- if fill_color is not None :
1729
- limb .set_facecolor (fill_color )
1730
- for spine in ax .spines .values ():
1731
- spine .set_edgecolor (color )
1732
- ax .set_frame_on (True )
1733
- # FIXME? should zorder be set separately for edge and background?
1734
- if zorder is not None :
1735
- limb .set_zorder (zorder )
1736
- for spine in ax .spines .values ():
1737
- spine .set_zorder (zorder )
1738
- else :
1739
- # use axesPatch for fill_color, spine for border line props.
1740
- for spine in ax .spines .values ():
1741
- spine .set_edgecolor (color )
1742
- ax .set_frame_on (True )
1743
- # FIXME? should zorder be set separately for edge and background?
1744
- if zorder is not None :
1745
- ax .axesPatch .set_zorder (zorder )
1746
- for spine in ax .spines .values ():
1747
- spine .set_zorder (zorder )
1748
- # for geos or ortho projections, also
1749
- # draw and fill map projection limb, clipped
1750
- # to rectangular region.
1751
- ax .add_patch (limb )
1752
- self ._mapboundarydrawn = limb
1753
- if fill_color is None :
1754
- limb .set_fill (False )
1755
- else :
1756
- limb .set_facecolor (fill_color )
1757
- limb .set_zorder (0 )
1758
- limb .set_edgecolor (color )
1759
- limb .set_linewidth (linewidth )
1760
- if zorder is not None :
1761
- limb .set_zorder (zorder )
1762
- limb .set_clip_on (True )
1713
+ limb .set_clip_on (True )
1763
1714
# set axes limits to fit map region.
1764
1715
self .set_axes_limits (ax = ax )
1765
1716
return limb
0 commit comments