SourceForge logo
SourceForge logo
Menu

matplotlib-users

Dear all matplotlib users,
I am trying to make a geographical map with colors, in which the colors of
pixels will depend on 2-dimensions of (x,y), like the one attached from one
publication. I searched online and this is where I arrive:
https://gist.github.com/ChaoYue/81eb01b558f068f11ee741c56557a6a2
To put it short, I know how to pick up color by x-axis value, and use
y-axis value as an indicator of either saturation, or brightness or
transparency of the color. Or somewhere to convert this (x,y) information
back to linear space and select color from a matplotlib colormap. But is
there some way that I can use different colors for each corner of the small
square as shown in the example, and somewhere interpolate the colors in
between? like the one attached?
These are the online sources that help me, even though I am not sure I
fully understand the tricks inside them ...:
http://stackoverflow.com/questions/15207255/is-there-any-way-to-use-bivariate-colormaps-in-matplotlib
https://github.com/matplotlib/matplotlib/issues/4369
Thanks a lot in advance for any suggestions,
Cheers,
Chao
On Mon, Jul 25, 2016 at 4:34 PM, Chao YUE <cha...@gm...> wrote:
> Dear all matplotlib users,
>
> I am trying to make a geographical map with colors, in which the colors of
> pixels will depend on 2-dimensions of (x,y), like the one attached from one
> publication. I searched online and this is where I arrive:
>
> https://gist.github.com/ChaoYue/81eb01b558f068f11ee741c56557a6a2
>
> To put it short, I know how to pick up color by x-axis value, and use
> y-axis value as an indicator of either saturation, or brightness or
> transparency of the color. Or somewhere to convert this (x,y) information
> back to linear space and select color from a matplotlib colormap. But is
> there some way that I can use different colors for each corner of the small
> square as shown in the example, and somewhere interpolate the colors in
> between? like the one attached?
>
> These are the online sources that help me, even though I am not sure I
> fully understand the tricks inside them ...:
>
>
> http://stackoverflow.com/questions/15207255/is-there-any-way-to-use-bivariate-colormaps-in-matplotlib
>
> https://github.com/matplotlib/matplotlib/issues/4369
>
> Thanks a lot in advance for any suggestions,
>
> Cheers,
> Chao
>
> --
> please visit:
> http://www.globalcarbonatlas.org/
>
> ***********************************************************************************
> Chao YUE
> postdoc at LSCE
> CEA-Ormes des Merisiers, F-91191 GIF-SUR-YVETTE CEDEX
> Tel: 33 1 69 08 41 87
>
> ************************************************************************************
>
-- 
please visit:
http://www.globalcarbonatlas.org/
***********************************************************************************
Chao YUE
postdoc at LSCE
CEA-Ormes des Merisiers, F-91191 GIF-SUR-YVETTE CEDEX
Tel: 33 1 69 08 41 87
************************************************************************************
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /