I run this code, but labels do not appear under the ticks. # label the X ticks with years self.mpl.canvas.ax.set_xticks(np.arange(len(years))+width/2, [int(year) for year in years]) self.mpl.canvas.ax.set_xticklabels([str(year) for year in years]) I Need an help. Thanks. -- View this message in context: http://old.nabble.com/displaying-ticklabels-on-a-graph-tp31484414p31484414.html Sent from the matplotlib - devel mailing list archive at Nabble.com.
On Wed, Apr 27, 2011 at 4:17 AM, Clyng11 <cou...@ya...> wrote: > > I run this code, but labels do not appear under the ticks. > > # label the X ticks with years > self.mpl.canvas.ax.set_xticks(np.arange(len(years))+width/2, > [int(year) for year in years]) > self.mpl.canvas.ax.set_xticklabels([str(year) for year in years]) > > I Need an help. Could you post a complete, free-standing example that we can run that exposes your problem?