I making an application to plot Airfoils profiles in matplotlib and I need to plot a number of profiles in the same subplot. I know how to add a fixed number of series, but not how to do it dynamically. My code for one profile is:
pts = d['AG17']
fig = plt.figure()
ax = fig.add_subplot(111, aspect='equal')
ax.plot(pts[:, 0], pts[:, 1], '-r')
ax.grid()
plt.show()
and for example for two profiles something like
ax.plot(pts[:, 0], pts[:, 1], '-r', pts1[:, 0], pts1[:, 1], '-r')
but how do I do it for n numbers of profiles?
plotcalls for a single subplot.LineCollectionmight also be useful to you