Re: Set value or colour for non existing data in contourplot?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Mar 08 2010 - 12:03:29 MST

Hi Sebastian,

As you saw, the "cn" resources only apply in the range of your
coordinate arrays.

If your coordinate arrays only go from 3 to 6 latitude, and 14 to 18
longitude,
then trying to set cn resources for the areas outside this range will
have no effect.

I assume you are overlaying this data on a map, and that you have
cnFillOn set to True for filled contours?

If so, then you can set the fill areas for the areas outside your plot
by setting some map fill color resources:

   res@mpFillOn = True ; the default for
gsn_csm_xxxx functions
   res@mpLandFillColor = ... ; Use an index color value or a
named color, like "gray"
   res@mpOceanFillColor = ...

to whatever values you want. You will need to make sure your
contour values get filled last (which I think is the default). You
can make sure of this by further setting:

   res@cnFillDrawOrder = "PostDraw"
   res@mpFillDrawOrder = "Draw"

--Mary

On Mar 8, 2010, at 4:52 AM, Sebastian Schubert wrote:

> Dear Bjoern,
>
> On Monday, 8. March 2010 12:11:52 Bjoern Maronga wrote:
>> Hi,
>>
>> I'm sorry, but I just don't get it.
>
> ...
>
>
>> will set all data points with values > 1.0 to missing values.
>>
>> Maybe you explain your problem a little bit clearer.
>
> Sorry for being not clear enough.
>
> Let's say, I have data for latitude 3 til 6 and longitude 14 til 18.
> Now, for whatever reason, I decide to plot using the ranges latitude 0
> til 10 and longitude 10 til 20. Then I get a white border around the
> area I have data for. I tried setting cnMissingValFillColor and
> cnMissingValFillPattern and I always get the border. So either I did
> something wrong or the options are not meant for this kind of implicit
> missing value (instead of having a _FillValue in the data, there is
> just
> no data at all).
>
> Of course, I could create a larger data field initialized with the
> value
> I want and put my smaller data into it. But since a rotated pole
> conversion is between I'd rather like have an automatic way of doing
> this.
>
> Cheers
> Sebastian
>
> --
> Potsdam Institute for Climate Impact Research (PIK)
> Research Domain II - Climate Impacts & Vulnerabilities
> http://www.pik-potsdam.de/members/schubert/
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 8 12:04:10 2010

This archive was generated by hypermail 2.1.8 : Mon Mar 08 2010 - 12:07:42 MST