[yt-users] Accessing colormap colors

Massimo Gaspari gaspmax at hotmail.com
Mon Aug 18 10:42:40 PDT 2014


Hi all,

I'd like to plot a line with a given color taken from a given colormap.

I am trying to access e.g.
pylab.cm.jet(0.5)
in order to get the tuple to put in pylab.plot(…, ... , color = …)

However it gives me the error:
TypeError: 'dict' object is not callable

If I remove the import line
from yt.mods import *
it works fine though.

Should I call something else within yt environment?
By the way, is there another quick way to access a given colormap color?

Thanks,

  Max


More information about the yt-users mailing list