kopia lustrzana https://github.com/ctjacobs/pyqso
Use annotations to label pinpoints.
rodzic
3f29d763e4
commit
f597122721
|
@ -335,7 +335,8 @@ class WorldMap:
|
|||
logging.debug("Plotting QTHs on the map...")
|
||||
for p in self.points:
|
||||
ax.plot(p.longitude, p.latitude, p.style, transform=cartopy.crs.PlateCarree())
|
||||
ax.text(p.longitude+0.08*p.longitude, p.latitude+0.04*p.latitude, p.name, color="orange", size=8)
|
||||
at_x, at_y = ax.projection.transform_point(p.longitude, p.latitude, src_crs=cartopy.crs.PlateCarree())
|
||||
ax.annotate(p.name, xy=(at_x, at_y), xytext=(0, 2.5), textcoords="offset points", color="orange", size="small", weight="bold")
|
||||
|
||||
# Draw Maidenhead grid squares and shade in the worked squares.
|
||||
x = numpy.linspace(-180, 180, len(list(self.maidenhead.upper))+1)
|
||||
|
@ -353,7 +354,7 @@ class WorldMap:
|
|||
for i in range(len(self.maidenhead.upper)):
|
||||
for j in range(len(self.maidenhead.upper)):
|
||||
text = self.maidenhead.upper[i]+self.maidenhead.upper[j]
|
||||
ax.text((x[i]+x[i+1])/2.0, (y[j]+y[j+1])/2.0, text, ha="center", va="center", size=8, color="w", alpha=0.6)
|
||||
ax.text((x[i]+x[i+1])/2.0, (y[j]+y[j+1])/2.0, text, ha="center", va="center", size="small", color="w", alpha=0.6)
|
||||
|
||||
return True
|
||||
else:
|
||||
|
|
Ładowanie…
Reference in New Issue