In gnuplot it is quite easy to create two axes, but I can't figure out how to do it in matplotlib. I'm trying this:
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt for key1 in keys1: ax1.plot(x, y, style, label=label, color=color, linewidth=3) ax1.set_xlabel(xlabel) ax1.set_ylabel(ylabel1) ax2.set_ylabel(ylabel2) plt.legend(loc='lower right', shadow=True) plt.suptitle(title, fontsize=14, fontweight='bold') axes = plt.gca() axes.set_ylim([0,1]) plt.grid(b=True, which='major', color='k', linestyle='--') plt.savefig('{}.png'.format(key1), dpi=600) plt.close() plt.clf() But I get this error: lib/python3.3/site-packages/matplotlib/axes.py:4749: UserWarning: No labeled objects found. Use label='...' kwarg on individual plots. warnings.warn("No labeled objects found. " What am I doing wrong? Thanks. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users