Skip to content

Commit 66410c5

Browse files
Update germany_plot_v04.py
moved a loop to another loop
1 parent 97c8af8 commit 66410c5

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

germany_plot_v04.py

+22-22
Original file line numberDiff line numberDiff line change
@@ -140,31 +140,31 @@
140140
# locations.plot(ax=ax, marker=markersymbol, markersize=ms, color=colordata, label=topiclabel, linestyle='None') #style 01, style 02 borderstyle 01
141141
locations.plot(ax=ax, marker=markersymbol, markersize=ms, color=colordata, label=topiclabel, linestyle='None', edgecolor="black", linewidth=0.2) #style 03
142142
# add location name to point
143-
if not city[n] in citychecklist:
144-
x = locations.geometry.x
145-
y = locations.geometry.y
146-
if city[n]=="Aachen":
147-
plt.annotate(city[n], xy=(x,y), xytext=(0,-7.0), textcoords="offset points", ha="center", size="5")
148-
elif city[n]=="Bochum":
149-
plt.annotate(city[n], xy=(x,y), xytext=(-4.0,-2.0), textcoords="offset points", ha="right", size="5")
150-
elif city[n]=="Mainz":
151-
plt.annotate(city[n], xy=(x,y), xytext=(-2.0,8.5), textcoords="offset points", ha="center", size="5")
152-
elif city[n]=="Potsdam":
153-
plt.annotate(city[n], xy=(x,y), xytext=(4.0,-4.0), textcoords="offset points", size="5")
154-
elif city[n]=="Hannover" or city[n]=="Halle" or city[n]=="Münster":
155-
plt.annotate(city[n], xy=(x,y), xytext=(0,4.0), textcoords="offset points", ha="center", size="5")
156-
elif city[n]=="Darmstadt":
157-
plt.annotate(city[n], xy=(x,y), xytext=(0,-6.0), textcoords="offset points", ha="center", size="5")
158-
elif city[n]=="8xNationalChemotion":
159-
plt.annotate("+ 9 national Chemotion WS", xy=(x,y), xytext=(0.0,-2.0), textcoords="offset points", size="5")
160-
elif city[n]=="8xNationalRDM":
161-
plt.annotate("+ 8 national RDM WS", xy=(x,y), xytext=(0.0,-2.0), textcoords="offset points", size="5")
162-
else:
163-
plt.annotate(city[n], xy=(x,y), xytext=(4.0,-2.0), textcoords="offset points", size="5")
143+
if not city[n] in citychecklist:
144+
x = locations.geometry.x
145+
y = locations.geometry.y
146+
if city[n]=="Aachen":
147+
plt.annotate(city[n], xy=(x,y), xytext=(0,-7.0), textcoords="offset points", ha="center", size="5")
148+
elif city[n]=="Bochum":
149+
plt.annotate(city[n], xy=(x,y), xytext=(-4.0,-2.0), textcoords="offset points", ha="right", size="5")
150+
elif city[n]=="Mainz":
151+
plt.annotate(city[n], xy=(x,y), xytext=(-2.0,8.5), textcoords="offset points", ha="center", size="5")
152+
elif city[n]=="Potsdam":
153+
plt.annotate(city[n], xy=(x,y), xytext=(4.0,-4.0), textcoords="offset points", size="5")
154+
elif city[n]=="Hannover" or city[n]=="Halle" or city[n]=="Münster":
155+
plt.annotate(city[n], xy=(x,y), xytext=(0,4.0), textcoords="offset points", ha="center", size="5")
156+
elif city[n]=="Darmstadt":
157+
plt.annotate(city[n], xy=(x,y), xytext=(0,-6.0), textcoords="offset points", ha="center", size="5")
158+
elif city[n]=="8xNationalChemotion":
159+
plt.annotate("+ 9 national Chemotion WS", xy=(x,y), xytext=(0.0,-2.0), textcoords="offset points", size="5")
160+
elif city[n]=="8xNationalRDM":
161+
plt.annotate("+ 8 national RDM WS", xy=(x,y), xytext=(0.0,-2.0), textcoords="offset points", size="5")
162+
else:
163+
plt.annotate(city[n], xy=(x,y), xytext=(4.0,-2.0), textcoords="offset points", size="5")
164164

165165
#for x, y, label in zip(cities.geometry.x, cities.geometry.y, cities.name):
166166
# ax.annotate(label, xy=(x, y), xytext=(3, 3), textcoords="offset points")
167-
citychecklist.append(city[n])
167+
citychecklist.append(city[n])
168168
n += 1
169169

170170
if m==0:

0 commit comments

Comments
 (0)