I am having trouble looping through each subplot. I reach the coordinates for the subplot, and then want different models to appear on each subplot. However, my current solution loops through all of the subplots, but at each one loops through all of the models, leaving the last model to be graphed at each subplot, meaning they all look the same.
My goal is to place one model on every subplot. Please help!
modelInfo = csv_info(filename) # obtains information from csv file
f, axarr = plt.subplots(4, 6)
for i in range(4):
for j in range(6):
for model in modelInfo:
lat = dictionary[str(model) + "lat"]
lon = dictionary[str(model) + "lon"]
lat2 = dictionary[str(model) + "lat2"]
lon2 = dictionary[str(model) + "lon2"]
axarr[i, j].plot(lon, lat, marker = 'o', color = 'blue')
axarr[i, j].plot(lon2, lat2, marker = '.', color = 'red')
axarr[i, j].set_title(model)