Re: scatterplot with multiple datasets

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri, 15 Sep 2006 08:05:17 -0600 (MDT)

Hi James,

Yes, you should be able to do this with a series of XY plots. First,
make sure you load the gsn_code script at the beginning of your script:

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"

Create an array to hold each plot object:

    plotid = new(4,graphic)

In the xyPlotClass "create" block, make sure the variable on the
left-hand side is indexed appropriately:

   plotid(i) = create "xyPlot" xyPlotClass xworkid
       "xyCoordData": dataid
       ...
   end create

After you create all your plotids, you can then call gsn_panel with
something like:

   pnlres = True
   pnlres@... = ...
   gsn_panel(xworkid,plotid,(/2,2/),pnlres)

Cheers,

--Mary

On Thu, 14 Sep 2006, James McPhee wrote:

> Thanks Mary,
> It was the naming of the file... now I'd like to create a panel plot where
> each panel shows more than one dataset. Is it possible to combine xyPlot as
> in example xy07n.nc with gsn_panel?
>
> Thanks a lot!
>
> James
>
> Mary Haley wrote:
>> Hi James,
>>
>> Thanks for providing a test script with dummy data. I ran this on my
>> machine and it seemed to work fine. I got two curves, one red
>> and one blue, each with two different markers.
>>
>> Did you name the resource file "test.res"? The resource file needs to
>> have the same name as the second argument to gsn_open_wks, with a
>> ".res" appended.
>>
>> --Mary
>>
>> On Tue, 12 Sep 2006, James McPhee wrote:
>>
>>> Dear All,
>>> I'm trying to create a single scatter plot including multiple datasets.
>>> Very much like the one contained in the example xy07n.ncl
>>> (http://www.ncl.ucar.edu/Applications/BasicExamples/XyPlot/xy07.shtml)
>>>
>>> I've followed the steps given in the example but it seems that something
>>> is missing when it comes down to recognizing the resources in the res file
>>> (essentially, none of the resources in the res file are applied to my
>>> plot... :( ). I'm attaching the ncl file and the res file. Any help
>>> figuring the problem out will be greatly appreciated.
>>>
>>> James
>>>
>>
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Sep 15 2006 - 08:05:17 MDT

This archive was generated by hypermail 2.2.0 : Fri Sep 15 2006 - 08:14:44 MDT