@@ -2402,9 +2402,9 @@ def addlon(meridians,madd):
24022402 elif self .projection == 'ortho' and self .round :
24032403 pole = 1
24042404 if pole == 1 :
2405- if self . projection != 'ortho' :
2406- theta = ( np . pi / 180. ) * ( merid - self . projparams [ 'lon_0' ] - 90 )
2407- else :
2405+ theta = ( np . pi / 180. ) * ( merid - self . projparams [ 'lon_0' ] - 90 )
2406+ if self . projection == 'ortho' and \
2407+ self . projparams [ 'lat_0' ] == - 90 :
24082408 theta = (np .pi / 180. )* (- merid + self .projparams ['lon_0' ]+ 90 )
24092409 x = r * np .cos (theta )+ 0.5 * (self .xmin + self .xmax )
24102410 y = r * np .sin (theta )+ 0.5 * (self .ymin + self .ymax )
@@ -2421,10 +2421,10 @@ def addlon(meridians,madd):
24212421 else :
24222422 vertalign = 'center'
24232423 # labels [l,r,t,b]
2424- if labels [0 ] and x >= 0.5 * (self .xmin + self .xmax )+ xoffset : continue
2425- if labels [1 ] and x <= 0.5 * (self .xmin + self .xmax )- xoffset : continue
2426- if labels [2 ] and y <= 0.5 * (self .ymin + self .ymax )- yoffset : continue
2427- if labels [3 ] and y >= 0.5 * (self .ymin + self .ymax )+ yoffset : continue
2424+ if labels [0 ] and not labels [ 1 ] and x >= 0.5 * (self .xmin + self .xmax )+ xoffset : continue
2425+ if labels [1 ] and not labels [ 0 ] and x <= 0.5 * (self .xmin + self .xmax )- xoffset : continue
2426+ if labels [2 ] and not labels [ 3 ] and y <= 0.5 * (self .ymin + self .ymax )- yoffset : continue
2427+ if labels [3 ] and not labels [ 2 ] and y >= 0.5 * (self .ymin + self .ymax )+ yoffset : continue
24282428 elif pole == - 1 :
24292429 theta = (np .pi / 180. )* (- merid + self .projparams ['lon_0' ]+ 90 )
24302430 x = r * np .cos (theta )+ 0.5 * (self .xmin + self .xmax )
@@ -2442,10 +2442,10 @@ def addlon(meridians,madd):
24422442 else :
24432443 vertalign = 'center'
24442444 # labels [l,r,t,b]
2445- if labels [0 ] and x <= 0.5 * (self .xmin + self .xmax )+ xoffset : continue
2446- if labels [1 ] and x >= 0.5 * (self .xmin + self .xmax )- xoffset : continue
2447- if labels [2 ] and y >= 0.5 * (self .ymin + self .ymax )- yoffset : continue
2448- if labels [3 ] and y <= 0.5 * (self .ymin + self .ymax )+ yoffset : continue
2445+ if labels [0 ] and not labels [ 1 ] and x <= 0.5 * (self .xmin + self .xmax )+ xoffset : continue
2446+ if labels [1 ] and not labels [ 0 ] and x >= 0.5 * (self .xmin + self .xmax )- xoffset : continue
2447+ if labels [2 ] and not labels [ 3 ] and y >= 0.5 * (self .ymin + self .ymax )- yoffset : continue
2448+ if labels [3 ] and not labels [ 2 ] and y <= 0.5 * (self .ymin + self .ymax )+ yoffset : continue
24492449 t = \
24502450 ax .text (x ,y ,lonlab ,horizontalalignment = horizalign ,verticalalignment = vertalign ,** kwargs )
24512451 meridict [merid ][1 ].append (t )
0 commit comments