Re: shading-contour-vector paneling

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri, 14 Sep 2007 07:23:19 -0600 (MDT)

Soo-Jin,

Saji's suggestion is a good one. If you can provide a minimal example
and even some data, this goes a long way in helping us to help you.
Please read my paragraphs below, however, before you do this.

The "overlay" procedure does not do any drawing or frame advancing.
It's most likely the gsn_csm_contour call that you are seeing the
frame advance from.

Saji was also right that you probably need to add:

   cnres_at_gsnDraw = False
   cnres_at_gsnFrame = False

What overlay does is effectively make the overlay plot part of the
base plot, so that every time you draw the base plot, both the base
plot and the overlaid plot get drawn. Once you call gsn_panel with
your "plot" array variable, then, you should see the base and overlaid
plots drawn, *if* they were overlaid correctly. By this I mean that
the coordinate arrays of your contour data (variable "data" in the
example below) must be in the same data space as your base plot.

You must already have the correct coordinate arrays for u850 and v850,
if you were able to overlay this data correctly on map. Hopefully,
then, the coordinate arrays for your contour data are either the same,
or very close to the same values.

--Mary

On Fri, 14 Sep 2007, Saji Njarackalazhikam Hameed wrote:

> Soo-Jin,
>
> read examples carefully..also it make sense to include some minimal
> example when you request responses to your problem.
>
> In your case, you may need to set gsn_Draw and gsn_Frame to false
> before overlaying.
>
> saji
>
> * Soo-Jin Sohn <jeenie7_at_apcc21.net> [2007-09-13 09:51:04 +0900]:
>
>> Hi Mary,
>>
>> Thank you for your answer.
>> I don't solve that problem yet.
>> I inserted 2 lines in my codes which you mentioned.
>> But it doesn't work.
>> And the result is different from my expectation.
>> The output is not the panel plot.
>> I can see just contour plots per frame.
>> It seems that "overlay" closes the frame but I would like to draw a panel
>> plot.
>>
>> Soo-Jin
>>
>>
>>
>> -----Original Message-----
>> From: Mary Haley [mailto:haley_at_ucar.edu]
>> Sent: Thursday, September 13, 2007 12:20 AM
>> To: Soo-Jin Sohn
>> Cc: ncl-talk_at_ucar.edu
>> Subject: Re: shading-contour-vector paneling
>>
>>
>> On Wed, 12 Sep 2007, Soo-Jin Sohn wrote:
>>
>>> Hi All,
>>>
>>>
>>>
>>> I would like to draw a panel plot which is 3 by 3.
>>>
>>> Each plot should be drawn shading-contour-vector together.
>>>
>>>
>>>
>>> plot = new(dimsizes(mNames), graphic)
>>>
>>> do imod = 0, dimsizes(mNames)-1
>>>
>>> plot (imod) = gsn_csm_vector_scalar_map(wks,u850,v850, skew,res)
>>>
>>> end do ; imod-end
>>>
>>> gsn_panel(wks, plot, (/3,3/), resp)
>>>
>>> I want to add contour on this plot.
>>>
>>> Thanks in advance for all your help.
>>>
>>> Soo-Jin
>>
>> Hi Soo-Jin,
>>
>> You can use the "overlay" procedure to overlay an additional contour
>> plot. The data for the contour plot must have coordinate arrays in
>> the same data space as your vector/scalar plot.
>>
>> Here's an example:
>>
>> cnres = True ; Set up resource list for contours
>> cnres@... = ...
>>
>> do imod = 0, dimsizes(mNames)-1
>>
>> plot (imod) = gsn_csm_vector_scalar_map(wks,u850,v850, skew,res)
>> contour = gsn_csm_contour(wks,data,cnres)
>> overlay(plot(imod),contour)
>>
>> end do ; imod-end
>>
>> You can see some contour on contour overlay examples at:
>>
>> http://www.ncl.ucar.edu/Applications/conOncon.shtml
>>
>>
>> --Mary
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> --
> Saji N. Hameed
>
> APEC Climate Center +82 51 668 7470
> National Pension Corporation Busan Building 12F
> Yeonsan 2-dong, Yeonje-gu, BUSAN 611705 saji_at_apcc21.net
> KOREA
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Sep 14 2007 - 07:23:19 MDT

This archive was generated by hypermail 2.2.0 : Fri Sep 14 2007 - 08:05:02 MDT