Re: problem in paneling vector-contour plots.

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Tue Jun 17 2014 - 14:54:44 MDT

I've attached the modified script, but I don't think it will help -- I
think the vector overlays are bogus. In any case, I've added a few print
statements to look at what some of the numbers are. You might try this as
well to make sure they are what you think they should be. For example, the
numbers for fuy2/fuz2 are rather large, with the fuy2 component generally
1-2 orders of magnitude larger than fuz2. I'm not an atmospheric
scientist, so maybe that's correct.


I don't really understand the scaling of "lats" for your vector plots,
where you assign the resource res@vfXArray = lats / 180 * PI * A.
However, if I just set it to "lats", then the vectors appear in the
overlays, but are very small and face either straight left or right.
Again, I don't really know what I'm doing.

Your best bet might be to post to the ncl-talk group, explaining what you
are trying to do from a scientific perspective.

Sorry -- I wish I could help more...

Rick


On Tue, Jun 17, 2014 at 1:47 PM, Verena Lili <verena.prick@gmail.com> wrote:

> Rick,
> I am so stucked, nothing else I can do how to deal with this issue.
> You said that their magnitude is lsightly different? how is about the
> direction?
> if the direction is quite the same as the overlying contours so i think i
> can work with that,
> could you send the modified script?
>
> is there anyone in NCAR graphic who can help me on this issue,
> i cant submit my paper before finishding this figure :(
> Thanks alot.
>
> Verena
>
>
> On Wed, Jun 18, 2014 at 1:59 AM, Rick Brownrigg <brownrig@ucar.edu> wrote:
>
>> OK, I see what you are saying about differences in alignment with
>> tfDoNDCOverlay.
>>
>> Unfortunately, I am at a loss as to what to suggest further. I suspect
>> the reason it appears to be working in the single plot case is that your
>> script does not invoke overlay() in that instance; it is effectively a
>> graphical overlay. When overlay() is used for the paneled plots, I believe
>> it to be a coordinate based overlay/transformation, and your contour plot
>> is in a very different coordinate space than the vectors (degrees-lat vs.
>> scaled radians?) I tried plotting the vectors in degrees, and while I got
>> vectors on the overlay/panel plots, their magnitudes were very different
>> from your single-plot case.
>>
>> Hopefully someone else may know what to suggest....
>>
>> Rick
>>
>>
>>
>>
>>
>> On Tue, Jun 17, 2014 at 7:24 AM, Verena Lili <verena.prick@gmail.com>
>> wrote:
>>
>>> Hi Rick,,
>>>
>>> It looks OK but not solving my problem in paneling the plot. The problem
>>> is the function of "*tfDoNDCOverlay" *force my vector data into the
>>> base-plot coordinate. If you look carefully to the vectors, the vectors are
>>> not in log-pressure coordinate like the single plot that I did.
>>>
>>> I am just wondering, why doing a single plot by:
>>>
>>> over = gsn_contour(wks,ep_div,xres)
>>> vc = gsn_vector (wks,fuy,fuz,res)
>>> frame(wks)
>>>
>>>
>>> works OK but, when I did panel plots they are no working at all. I
>>> really need NCL developer help, since I need to publish one paper where
>>> the plots should be in a panel plot. I already sent an example input data
>>> and script.
>>>
>>>
>>> Thank you very much for your kind help.
>>> Regards
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Jun 10, 2014 at 6:48 PM, Rick Brownrigg <brownrig@ucar.edu>
>>> wrote:
>>>
>>>> Hi Verena,
>>>>
>>>>
>>>> A colleague pointed out a magic resource that seems to do the trick for
>>>> your plots. Try adding:
>>>>
>>>> res@tfDoNDCOverlay = "NDCViewport"
>>>>
>>>> to the resources for the vector plots. I tried it here and it seems to
>>>> work.
>>>>
>>>> Rick
>>>>
>>>>
>>>>
>>>> On Mon, Jun 9, 2014 at 11:26 AM, Verena Lili <verena.prick@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Rick and NCL,
>>>>>
>>>>> Thanks for looking at my code, Here is I attached the code
>>>>> without paneling, Everything is just OK, but as for publication
>>>>> I need to panel the plots in one figure, I am so stucked on this case,
>>>>> for panelling. If everyone has an idea, please do share. Thanks
>>>>>
>>>>> ps: just run the code with the same data that I sent previously.
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Jun 10, 2014 at 2:14 AM, Rick Brownrigg <brownrig@ucar.edu>
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I was unable to duplicate your 1st non-paneled example overlay; I
>>>>>> could only plot the contour and vector plot separately. Your script looks
>>>>>> very much like one of our examples (panel_13.ncl), so I don't get it.
>>>>>>
>>>>>> I am perplexed however at these resource settings for the vector
>>>>>> plots:
>>>>>>
>>>>>> res@vfXArray = lats / 180 * PI * A
>>>>>> res@tmXBMode = "explicit"
>>>>>> res@tmXBValues = (/ 10.,20.,30.,40.,50.,60.,70.,80.,90. /) / 180. *
>>>>>> PI * A
>>>>>> res@tmXBLabels = (/ 10.,20.,30.,40.,50.,60.,70.,80.,90. /)
>>>>>> res@trXMinF = 10/ 180. * PI * A
>>>>>> res@trXMaxF = 90/ 180. * PI * A
>>>>>>
>>>>>> doesn't that put the x-axis for the contour and vector plots on very
>>>>>> different scales?
>>>>>>
>>>>>> Wish I could be of more help...
>>>>>> Rick
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Sun, Jun 8, 2014 at 7:23 AM, Verena Lili <verena.prick@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hallo NCL developer / people.
>>>>>>>
>>>>>>> I am experiencing a small problem in panelling the vector conour
>>>>>>> plots as you can
>>>>>>> see attached herewith. Without paneling both contour and vector, it
>>>>>>> works OK,
>>>>>>> once I did a paneling plot, it seems that the vector diminsihed.
>>>>>>> I attached a script and a small data from my model experiments.
>>>>>>> Thank you for any help!.
>>>>>>>
>>>>>>> --
>>>>>>> Regards,
>>>>>>> Dr. Verena.
>>>>>>> School of Marine and Atmospheric Sciences
>>>>>>> Stony Brook University
>>>>>>> homepage: http://www.somas.stonybrook.edu/
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> ncl-talk mailing list
>>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Dr. Verena.
>>>>> School of Marine and Atmospheric Sciences
>>>>> Stony Brook University
>>>>> homepage: http://www.somas.stonybrook.edu/
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Regards,
>>> Dr. Verena.
>>> School of Marine and Atmospheric Sciences
>>> Stony Brook University
>>> homepage: http://www.somas.stonybrook.edu/
>>>
>>
>>
>
>
> --
> Regards,
> Dr. Verena.
> School of Marine and Atmospheric Sciences
> Stony Brook University
> homepage: http://www.somas.stonybrook.edu/
>

Received on Tue Jun 17 08:54:45 2014

This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT