comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » CGContour with and without cell_fill keyword
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
CGContour with and without cell_fill keyword [message #89925] Mon, 29 December 2014 09:03 Go to next message
envi35@yahoo.ca is currently offline  envi35@yahoo.ca
Messages: 48
Registered: March 2005
Member
Hi all, I'm using CGContour to make maps of vegetation index. I found my maps look quite different when I plot with or without the /cell_fill keyword as in the following lines:

CGContour,lai,lon,lat,/cell_fill,c_colors=c_colors,Levels=us erLevels,max_value=dmax,min_value=dmin,C_CHARTHICK=2,/overpl ot, Color=black,missingvalue=nan

CGContour, lai,lon,lat,c_colors=c_colors,Levels=userLevels,max_value=dm ax,$
min_value=dmin,C_CHARTHICK=2,/overplot, Color=black,missingvalue=nan

I know David suggests using cell_fill for projected maps or data with missing values, I thought that's just for making the map looks good, e.g. without holes etc., but not different maps.

The map without the cell_fill keyword shows larger values (more realistic to me)than the map with the keyword. Does anybody knows why? Which map is correct?

Thanks very much,
Jenny
Re: CGContour with and without cell_fill keyword [message #89926 is a reply to message #89925] Mon, 29 December 2014 09:32 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jenny writes:

>
> Hi all, I'm using CGContour to make maps of vegetation index. I found my maps look quite different when I plot with or without the /cell_fill keyword as in the following lines:
>
> CGContour,lai,lon,lat,/cell_fill,c_colors=c_colors,Levels=us erLevels,max_value=dmax,min_value=dmin,C_CHARTHICK=2,/overpl ot, Color=black,missingvalue=nan
>
> CGContour, lai,lon,lat,c_colors=c_colors,Levels=userLevels,max_value=dm ax,$
> min_value=dmin,C_CHARTHICK=2,/overplot, Color=black,missingvalue=nan
>
> I know David suggests using cell_fill for projected maps or data with missing values, I thought that's just for making the map looks good, e.g. without holes etc., but not different maps.
>
> The map without the cell_fill keyword shows larger values (more realistic to me)than the map with the keyword. Does anybody knows why? Which map is correct?

The one with the CELL_FILL keyword is correct. The other is completely
wrong. :-)

http://www.idlcoyote.com/color_tips/fill_colors.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: CGContour with and without cell_fill keyword [message #89927 is a reply to message #89926] Mon, 29 December 2014 10:14 Go to previous messageGo to next message
envi35@yahoo.ca is currently offline  envi35@yahoo.ca
Messages: 48
Registered: March 2005
Member
On Monday, December 29, 2014 12:32:39 PM UTC-5, David Fanning wrote:
> Jenny writes:
>
>>
>> Hi all, I'm using CGContour to make maps of vegetation index. I found my maps look quite different when I plot with or without the /cell_fill keyword as in the following lines:
>>
>> CGContour,lai,lon,lat,/cell_fill,c_colors=c_colors,Levels=us erLevels,max_value=dmax,min_value=dmin,C_CHARTHICK=2,/overpl ot, Color=black,missingvalue=nan
>>
>> CGContour, lai,lon,lat,c_colors=c_colors,Levels=userLevels,max_value=dm ax,$
>> min_value=dmin,C_CHARTHICK=2,/overplot, Color=black,missingvalue=nan
>>
>> I know David suggests using cell_fill for projected maps or data with missing values, I thought that's just for making the map looks good, e.g. without holes etc., but not different maps.
>>
>> The map without the cell_fill keyword shows larger values (more realistic to me)than the map with the keyword. Does anybody knows why? Which map is correct?
>
> The one with the CELL_FILL keyword is correct. The other is completely
> wrong. :-)
>
> http://www.idlcoyote.com/color_tips/fill_colors.html
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

Thanks! David. I guess the map with neither Fill nor Cell_Fill is more wrong?

Jenny
Re: CGContour with and without cell_fill keyword [message #89930 is a reply to message #89927] Mon, 29 December 2014 11:49 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jenny writes:

> Thanks! David. I guess the map with neither Fill nor Cell_Fill is more wrong?

I think the point is, if you are going to fill your contour plot with
colors, the colors should match the contour intervals displayed on the
plot. They don't if you set FILL, they do if you set CELL_FILL, when
doing contouring onto a map projection.

I don't know what "more wrong" means in the above context. I do know it
is usually a mistake to choose the version that "looks better" if
scientific accuracy is what you are aiming for. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: cgMap error!
Next Topic: _overloadMinus: what to do with invalid input?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:10:51 PDT 2025

Total time taken to generate the page: 0.00520 seconds