|
From: Gabriele B. <gb....@gm...> - 2014-02-23 01:28:22
|
Hi, I'm trying to follow this example to make a grid of subplot: http://matplotlib.org/examples/pylab_examples/line_styles.html but my code plot the two rows in two different figures (i attach them but I don't know if they are useful). Does anyone understand why? this is an extract of my code: alphas = [45, 75] numalp = len(alphas) angles = np.linspace(pi/12, pi/2, num=10) numobs = len(angles) axisNum = 0 for a in alphas: #[some operations] for obsangl in angles: #[some operations] axisNum += 1 axii = plt.subplot(numalp, numobs, axisNum) plt.errorbar(g, Pgamma, yerr = ePgamma, color = 'green', fmt = '.') axii1 = axii.twinx() plt.plot(g, lightcurva, 'b-') axii.set_yticklabels([]) axii.set_xticklabels([]) axii1.set_yticklabels([]) axii1.set_xticklabels([]) |