Re: Continuous colorbar [message #71538] |
Mon, 28 June 2010 10:41 |
zhangyehui
Messages: 4 Registered: May 2010
|
Junior Member |
|
|
On Jun 28, 12:02 pm, mgalloy <mgal...@gmail.com> wrote:
> On 6/28/10 8:35 AM, zhangyehui wrote:
>
>> Hi everyone,
>
>> I want to draw a contour map of correlation coefficients with
>> continuous color. As R varies between [-1, 1], I'd like those are
>> close to 0 shown in white color and those are close to 1(-1) with
>> darker colors. I usually use loadct colorbars. There are 41 colorbars.
>> But I can't find a colorbar with a white color in the middle. So I
>> just wondered if there is anyway I can do that. Thanks in advance.
>
>> Ally
>
> Try the diverging color tables in the Brewer color tables
> (http://colorbrewer2.org/). I have made IDL versions of the color table
> value that you can find at:
>
> http://michaelgalloy.com/2008/08/21/another-update-to-the-br ewer-colo...
>
> Mike
> --www.michaelgalloy.com
> Research Mathematician
> Tech-X Corporation
Thanks a lot for all your reply
Problem solved~~~^_*
The Brewer color tables are really good for me~~~
Cheers,
Ally
|
|
|
Re: Continuous colorbar [message #71541 is a reply to message #71538] |
Mon, 28 June 2010 09:02  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 6/28/10 8:35 AM, zhangyehui wrote:
> Hi everyone,
>
> I want to draw a contour map of correlation coefficients with
> continuous color. As R varies between [-1, 1], I'd like those are
> close to 0 shown in white color and those are close to 1(-1) with
> darker colors. I usually use loadct colorbars. There are 41 colorbars.
> But I can't find a colorbar with a white color in the middle. So I
> just wondered if there is anyway I can do that. Thanks in advance.
>
> Ally
Try the diverging color tables in the Brewer color tables
(http://colorbrewer2.org/). I have made IDL versions of the color table
value that you can find at:
http://michaelgalloy.com/2008/08/21/another-update-to-the-br ewer-color-table-file.html
Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
|
|
|
Re: Continuous colorbar [message #71542 is a reply to message #71541] |
Mon, 28 June 2010 08:43  |
zhangyehui
Messages: 4 Registered: May 2010
|
Junior Member |
|
|
On Jun 28, 11:19 am, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Jun 28, 11:35 am, zhangyehui <zhangye...@gmail.com> wrote:
>
>> I want to draw a contour map of correlation coefficients with
>> continuous color. As R varies between [-1, 1], I'd like those are
>> close to 0 shown in white color and those are close to 1(-1) with
>> darker colors. I usually use loadct colorbars. There are 41 colorbars.
>> But I can't find a colorbar with a white color in the middle. So I
>> just wondered if there is anyway I can do that. Thanks in advance.
>
> Some of the Brewer tables have white in the middle, going to saturated
> colors on different hues on each side. See
>
> http://michaelgalloy.com/2008/08/21/another-update-to-the-br ewer-colo...
>
> You can always make your own table, it is just an array with the RGB,
> HLS or HSV values for each index. The tricky part is deciding on how
> to vary the colors along the table, which has an important effect on
> how the resulting visualization is perceived.
Many thanks.
I found some tables I want in the Brewer tables. ^O^
|
|
|
Re: Continuous colorbar [message #71543 is a reply to message #71542] |
Mon, 28 June 2010 08:42  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
zhangyehui writes:
> I want to draw a contour map of correlation coefficients with
> continuous color. As R varies between [-1, 1], I'd like those are
> close to 0 shown in white color and those are close to 1(-1) with
> darker colors. I usually use loadct colorbars. There are 41 colorbars.
> But I can't find a colorbar with a white color in the middle. So I
> just wondered if there is anyway I can do that. Thanks in advance.
You can download a Brewer color table file here:
http://www.dfanning.com/programs/fsc_brewer.tbl
Once the file is located somewhere on your IDL path,
you can use it with all of the color tools available
in the Coyote Library. And, in particular, with CTLOAD
or XCOLORS by setting the /BREWER keyword. There are
about 12 divergent color tables amoung the 28 offered.
I use them all the time for exactly this purpose.
http://www.dfanning.com/color_tips/brewer.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
|
|
|
Re: Continuous colorbar [message #71545 is a reply to message #71543] |
Mon, 28 June 2010 08:19  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Jun 28, 11:35 am, zhangyehui <zhangye...@gmail.com> wrote:
> I want to draw a contour map of correlation coefficients with
> continuous color. As R varies between [-1, 1], I'd like those are
> close to 0 shown in white color and those are close to 1(-1) with
> darker colors. I usually use loadct colorbars. There are 41 colorbars.
> But I can't find a colorbar with a white color in the middle. So I
> just wondered if there is anyway I can do that. Thanks in advance.
Some of the Brewer tables have white in the middle, going to saturated
colors on different hues on each side. See
http://michaelgalloy.com/2008/08/21/another-update-to-the-br ewer-color-table-file.html
You can always make your own table, it is just an array with the RGB,
HLS or HSV values for each index. The tricky part is deciding on how
to vary the colors along the table, which has an important effect on
how the resulting visualization is perceived.
|
|
|