From: Chloe L. <ch...@be...> - 2012-10-26 17:49:18
|
Chloe Lewis PhD candidate, Harte Lab Division of Ecosystem Sciences, ESPM University of California, Berkeley 137 Mulford Hall Berkeley, CA 94720 ch...@be... Begin forwarded message: > From: Chloe Lewis <ch...@be...> > Subject: Re: [Matplotlib-users] how to express statistical data in colors > Date: October 26, 2012 10:47:54 AM PDT > To: ra...@0x... > > you'll be doing something like the second color bar, but making the boundary and color definitions a lot more flexible. Where the discrete color bar uses > > cmap = mpl.colors.ListedColormap(['r', 'g', 'b', 'c']) > bounds = [1, 2, 4, 7, 8] > you'll be making a whole LinearSegmentedColormap, see > http://matplotlib.org/api/colors_api.html#matplotlib.colors.LinearSegmentedColormap > and check out specifically the ascii-art explanation of interpolation between row[i] and row[i+1]. Red, green, blue will break based on your data density and how you want to express 'intensity'. And depending on whether you'll make it red-green-colorblindness neutral! > Interesting problem. Has it been implemented in some other software? > > Chloe Lewis > PhD candidate, Harte Lab > Division of Ecosystem Sciences, ESPM > University of California, Berkeley > 137 Mulford Hall > Berkeley, CA 94720 > ch...@be... > |