it doesn't seem like you are doing something wrong:
In [23]: pylab.text(0.25, 0.5, 'test', backgroundcolor='m', color='r')
In [24]: pylab.text(0.5, 0.5, 'test', backgroundcolor='m', color='k')
In [25]: pylab.text(0.75, 0.5, 'test', backgroundcolor='m', color='b')
alt text http://student.physics.ucdavis.edu/~rjames/test.png
perhaps somewhere else in your code (or the matplotlib installation) the matching of strings with colors was distorted?
source
share