Is there a way to format tick labels separately? For example:
LabelsList = ['Prospero', 'Miranda', 'Caliban', 'Ariel']
xlabels = ax.set_xticklabels( LabelsList, rotation=35,
horizontalalignment='right', fontstyle='italic', fontsize='10')
will give me italicized x tick labels; however, what if I want to italicize
all, but Prospero? Is there a way to format each label separately?
···
--
View this message in context: http://old.nabble.com/Separate-formatting-for-tick-labels-tp32852024p32852024.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
Try something like this.
ax = subplot(111)
LabelsList = ['Prospero', 'Miranda', 'Caliban', 'Ariel']
ax.set_xticks(range(len(LabelsList)))xlabels = ax.set_xticklabels(
LabelsList, rotation=35,
horizontalalignment='right',
fontstyle='italic', fontsize='10')
ticklabels = ax.get_xticklabels()ticklabels[0].set_fontstyle("normal")
Regards,
-JJ
···
On Wed, Nov 16, 2011 at 11:25 AM, magurling <magurling@...287...> wrote:
LabelsList = ['Prospero', 'Miranda', 'Caliban', 'Ariel']
xlabels = ax.set_xticklabels( LabelsList, rotation=35,
horizontalalignment='right', fontstyle='italic', fontsize='10')