Feed on
Posts
Comments

let’s say you’ve made a bar plot and you want to label the bars by strings (e.g. ‘A’, ‘B’) instead of the default number range.  to do with a list of labels named ‘bar_l’:

import pylab as pl

pl.xticks(np.arange(len(bar_l)),bar_l,rotation=45)


Bookmark and Share

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

Did I get this wrong? Let me know!

Trackback URI | Comments RSS

More blogs about http://desk.stinkpot.org:8080/tricks.