SourceForge logo
SourceForge logo
Menu

matplotlib-devel

From: Clyng11 <cou...@ya...> - 2011年04月27日 05:12:05
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.
From: John H. <jd...@gm...> - 2011年04月30日 17:15:49
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?
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /