Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/mpl_toolkits/basemap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4604,13 +4604,13 @@ def drawmapscale(self,lon,lat,lon0,lat0,length,barstyle='simple',\
ybottom = yc-yoffset/2
ytick = ybottom - yoffset/2
ytext = ytick - yoffset/2
rets.append(self.plot([x1,x4],[ytop,ytop],color=linecolor, linewidth=linewidth)[0])
rets.append(self.plot([x1,x4],[ytop,ytop],color=linecolor, linewidth=linewidth, ax=ax)[0])
#plot bottom line
rets.append(self.plot([x1,x4],[ybottom,ybottom],color=linecolor, linewidth=linewidth)[0])
rets.append(self.plot([x1,x4],[ybottom,ybottom],color=linecolor, linewidth=linewidth, ax=ax)[0])
#plot left edge
rets.append(self.plot([x1,x1],[ybottom,ytop],color=linecolor, linewidth=linewidth)[0])
rets.append(self.plot([x1,x1],[ybottom,ytop],color=linecolor, linewidth=linewidth, ax=ax)[0])
#plot right edge
rets.append(self.plot([x4,x4],[ybottom,ytop],color=linecolor, linewidth=linewidth)[0])
rets.append(self.plot([x4,x4],[ybottom,ytop],color=linecolor, linewidth=linewidth, ax=ax)[0])
#make a filled black box from left edge to 1/4 way across
rets.append(ax.fill([x1,x2,x2,x1,x1],[ytop,ytop,ybottom,ybottom,ytop],\
ec=fontcolor,fc=fillcolor1)[0])
Expand All @@ -4624,9 +4624,9 @@ def drawmapscale(self,lon,lat,lon0,lat0,length,barstyle='simple',\
rets.append(ax.fill([x3,x4,x4,x3,x3],[ytop,ytop,ybottom,ybottom,ytop],\
ec=fontcolor,fc=fillcolor2)[0])
#plot 3 tick marks at left edge, center, and right edge
rets.append(self.plot([x1,x1],[ytick,ybottom],color=linecolor, linewidth=linewidth)[0])
rets.append(self.plot([xc,xc],[ytick,ybottom],color=linecolor, linewidth=linewidth)[0])
rets.append(self.plot([x4,x4],[ytick,ybottom],color=linecolor, linewidth=linewidth)[0])
rets.append(self.plot([x1,x1],[ytick,ybottom],color=linecolor, linewidth=linewidth, ax=ax)[0])
rets.append(self.plot([xc,xc],[ytick,ybottom],color=linecolor, linewidth=linewidth, ax=ax)[0])
rets.append(self.plot([x4,x4],[ytick,ybottom],color=linecolor, linewidth=linewidth, ax=ax)[0])
#label 3 tick marks
rets.append(ax.text(x1,ytext,format % (0),\
horizontalalignment='center',\
Expand All @@ -4647,9 +4647,9 @@ def drawmapscale(self,lon,lat,lon0,lat0,length,barstyle='simple',\
fontsize=fontsize,color=fontcolor))
# 'simple' style
elif barstyle == 'simple':
rets.append(self.plot([x1,x4],[yc,yc],color=linecolor, linewidth=linewidth)[0])
rets.append(self.plot([x1,x1],[yc-yoffset,yc+yoffset],color=linecolor, linewidth=linewidth)[0])
rets.append(self.plot([x4,x4],[yc-yoffset,yc+yoffset],color=linecolor, linewidth=linewidth)[0])
rets.append(self.plot([x1,x4],[yc,yc],color=linecolor, linewidth=linewidth, ax=ax)[0])
rets.append(self.plot([x1,x1],[yc-yoffset,yc+yoffset],color=linecolor, linewidth=linewidth, ax=ax)[0])
rets.append(self.plot([x4,x4],[yc-yoffset,yc+yoffset],color=linecolor, linewidth=linewidth, ax=ax)[0])
rets.append(ax.text(xc,yc-yoffset,format % lenlab,\
verticalalignment='top',horizontalalignment='center',\
fontsize=fontsize,color=fontcolor))
Expand Down