Re: linint2_Wrap Regriding

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 06 2012 - 14:47:14 MDT

Ping,

You sent the graphical output to a PostScript (PS) file, and not to the screen. You can't have it do both, unfortunately, with just one call to gsn_open_wks.

If you want it to go to the screen, change "ps" to "x11".

If you want it to go to both, then you'll have to open two workstations, one for x11, and one for PS. Then, every time you draw something, you need to draw it to both workstations.

  pwks = gsn_open_wks("ps","cru") ; open ps file
  xwks = gsn_open_wks("x11","cru") ; open x11 file
 . . .

     plot(nt) = gsn_csm_contour_map_ce(xwks,x({YYYYMM(nt)},:,:),res)
     plot(nt) = gsn_csm_contour_map_ce(pwks,x({YYYYMM(nt)},:,:),res)
. . .

  gsn_panel(xwks,plot,(/3,2/),resP) ; now draw as one plot
  gsn_panel(pwks,plot,(/3,2/),resP)

Please see attached modification to your cru_7.ncl file.

You can also use the NhlChangeWorkstation procedure. For more information, see the example in the documentation:

http://www.ncl.ucar.edu/Document/Functions/Built-in/NhlChangeWorkstation.shtml

--Mary

On Aug 6, 2012, at 2:32 PM, Ping Yang wrote:

> Hi Marry,
>
> Do you mean this code runs successfully and the plot window also shows on the screen?
>
> In my computer there is no window appear for showing the graph.
>
> Ping
>
> On Mon, Aug 6, 2012 at 4:25 PM, Mary Haley <haley@ucar.edu> wrote:
> Ping,
>
> I don't understand. The "cru.ps" file you sent me has six plots in it.
>
> I don't see what the problem is.
>
> --Mary
>
> On Aug 6, 2012, at 1:51 PM, Ping Yang wrote:
>
> > Dear Mary,
> >
> > Enclosed is the ps file and the script I ran on my computer, I also share a folder through DropBox(if you received).
> >
> > Thanks a lot.
> >
> > Ping
> >
> > On Mon, Aug 6, 2012 at 12:05 PM, Mary Haley <haley@ucar.edu> wrote:
> > Ping,
> >
> > There's not enough information to go on here. The "cru.ps" file that it looks like you meant to attach was a bad link.
> >
> > When you say "the figure didn't show up", do you mean that you tried to open the "cru.ps" file and it was blank? Can you email me the file offline?
> >
> > Did you make any changes to cru_7.ncl? Are you using your own data file?
> >
> > The only thing that I can think of that might be the source of the problem is how the file "cru_7.ncl" was saved.
> >
> > Please make sure that the last line:
> >
> > gsn_panel(wks,plot,(/3,2/),resP) ; now draw as one plot
> >
> > Has a carriage return after it. If it doesn't, then this line may not get executed, and hence no plot will show up.
> >
> > --Mary
> >
> > On Aug 6, 2012, at 9:47 AM, Ping Yang wrote:
> >
> > > Dear Mary,
> > >
> > > I found a problem when I plan to plot an example of Climate Research Unit (CRU) Data, I have the required data and I ran the cru_7.ncl,the code ran and a cru.ps file was generated but figure didn't show up and I just got the just one command line showing
> > > "(0) PDSI: min=0 max=18.25".
> > >
> > > I am working on a Mac OS 10.7 system and I tried this script on different machines(I was thinking it might because of Xcode installation). However the situation didn't change.
> > >
> > > Would you please give me some help on this?
> > >
> > > Best Regards,
> > >
> > > Ping
> > >
> > > _______________________________________________
> > > ncl-talk mailing list
> > > List instructions, subscriber options, unsubscribe:
> > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> >
> >
> >
> > --
> > Ping Yang, Ph.D.
> > CUNY Environmental Crossroads Initiative
> > Marshak Science Building - Suite 925
> > The City College of New York - CUNY
> > 160 Convent Avenue, New York NY 10031
> > Phone: 212-650-5769
> > Fax: 212-650-7064
> >
> > <cru.ps><cru_7.ncl>
>
>
>
>
> --
> Ping Yang, Ph.D.
> CUNY Environmental Crossroads Initiative
> Marshak Science Building - Suite 925
> The City College of New York - CUNY
> 160 Convent Avenue, New York NY 10031
> Phone: 212-650-5769
> Fax: 212-650-7064
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Aug 6 14:47:23 2012

This archive was generated by hypermail 2.1.8 : Wed Aug 15 2012 - 08:12:08 MDT