Re: Plot with multiple y axis

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 9 Apr 2009 14:36:00 -0600 (MDT)

Michel,

It's a bit hairy to do what you're asking for. It involves using
annotations so you can attach the new the curve to the existing
plot. This allows you to resize the plot, and all four curves
font heights, etc, should adjust accordingly.

I basically took the code that does the extra axis for the third curve
of gsn_csm_xy3, and modified it to do a fourth curve with an axis on
the left.

I made the curve red so you can see it.

You can move that extra axis line closer to the plot by making the
value on the line:

     "amOrthogonalPosF" : .63

slightly smaller. A value of 0.50 will put that axis line right on top
of the original left axis line.

Would it be okay if I added this example to our XY applications page?

--Mary

On Thu, 9 Apr 2009 Michel.Mesquita_at_bjerknes.uib.no wrote:

> Masha,
>
> Thank you so much! This answers one of my questions in the email.
> Do you know anything about the other question, that is, how can I add
> 2 axes on the left and 2 on the right of a plot? Is it possible to do
> that in NCL? I have done it with three axes, as in the script I sent.
>
> Thanks!
>
> Michel
>
> Quoting "Maria (Masha) Tsukernik" <masha_at_ucar.edu>:
>
>> Michel:
>> You can use
>> gsn_add_polyline
>> http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_add_polyline.shtml
>> You can set any x y coordinates and a separate resource for color/dash
>> patterns etc.
>> There's also a possibility to add a polygon if you want to shade an
>> area on your plot.
>>
>> Cheers,
>> Masha
>>
>> On Thu, Apr 9, 2009 at 7:12 AM, <Michel.Mesquita_at_bjerknes.uib.no> wrote:
>>> Hi,
>>>
>>> I have made a plot using the function gsn_csm_xy3 for 3 different
>>> variables. Now, I need to add an extra variable (with a fourth axis: 2
>>> on the left and 2 on the right). How can I do that?
>>>
>>> You can check my script here:
>>> http://people.iarc.uaf.edu/~michel/ncl/xy3plot/plotpressdepth2.ncl
>>>
>>> If you plot it, you will be able to see the figure with the three
>>> variables. My fourth variable data is there in the file. It is called
>>> 'velocity', and I need to plot it from time(1,41).
>>>
>>> Another question that I have is: how can I add a line under (and
>>> outside) the plot along the x-axis? I wanted this line to mark when
>>> some specific events happened: for example, one line from a certain
>>> 'time' to another, and then another line for another period of time.
>>>
>>> Thank you so much!
>>>
>>> Kindest regards,
>>>
>>> Michel
>>>
>>> _______________________________________________
>>> 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
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 09 2009 - 14:36:00 MDT

This archive was generated by hypermail 2.2.0 : Sun Apr 12 2009 - 14:28:35 MDT