I'm using PyLab to make some graphs in Python. I want to make a text box that is colored magenta with black text, but cannot get the text to be black.
text(x, y, 'Summary', backgroundcolor = 'm', color = 'k')
This gives me a magenta background and then text that is almost just as pink. Any ideas what I'm doing wrong?
it doesn't appear as though you're doing anything wrong:
In : pylab.text(0.25, 0.5, 'test', backgroundcolor='m', color='r') In : pylab.text(0.5, 0.5, 'test', backgroundcolor='m', color='k') In : pylab.text(0.75, 0.5, 'test', backgroundcolor='m', color='b')
perhaps somewhere else in your code (or matplotlib installation) the mapping from strings to colors has been corrupted?