SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Amit F. <ami...@gm...> - 2010年11月29日 08:08:35
Hi,
I am trying to produce a pcolor figure with a black background using
 pylab.figure(facecolor = 'black')
Consequently, I need to change the tick colors and xlabel and ylabel
colors to white using
 pylab.xlabel('whatever is on the xlabel', color = 'white', fontsize
= 14)
 pylab.ylabel('whatever is on the ylabel', color = 'white', fontsize
= 14)
 pylab.yticks(color = 'white')
 pylab.xticks(color = 'white')
Up to this point, everything is OK. The next thing I need to do is
change the colors of the ticks and the ticklabels in the colorbar. I
understand that there are no simple pylab. commands which do so. I saw
in some matplotlib-users messages that one can write the following to
change the fontsize, for example:
 for t in cb.ax.get_yticklabels():
 t.set_fontsize(14)
I tried adding another line to this loop:
 t.set_color('white')
On one hand, there is no error message during parsing or compilation. On
the other hand, nothing actually changes, i.e. the color of the
ticklabels and ticks stays black.
How does one change this property?
Amit
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 によって変換されたページ (->オリジナル) /