Adam, I been trying to do what you said.
I modified the scripts.
I attach them and the final image, now I can draw everything, But instead of points on the map, they shown in another image.
I attach image of that too.
Thanks
> Date: Wed, 24 Aug 2011 10:08:58 -0600
> From: asphilli_at_ucar.edu
> To: ncl-talk_at_ucar.edu
> Subject: Re: Add points of interes to a background map
>
> Hi Vanesa,
> I wasn't as clear in my original response as I should have been. Here's
> the order of things you should do in order for everything to draw:
>
> pltres_at_PanelPlot = True ; = gsnFrame,gsnDraw = False
> ........
> plot = wrf_map_overlays(....,pltres,mpres)
> call gsn_add_polymarker/gsn_add_text for polymarkers/text
> draw(plot)
> draw_shapefile_lines(wks,plot) ; use gsn_polyline
> frame(wks)
>
> The reason for that order: Anytime you use gsn_add_* functions they need
> to be called before the plot is drawn and the frame is advanced. If you
> do not do that the gsn_add_* output will not be added to the plot.
> gsn_polyline (which draw_shapefile_lines uses) on the other hand, needs
> the plot to be drawn before it is called.
>
> I would recommend simplifying your script to test this out. Create the
> plot, manually call gsn_add_polymarker, call draw, then manually call
> gsn_polyline, then call frame..
>
> Hope that all makes sense.. If you continue to have issues please send
> ncl-talk the latest version of all three of your scripts...
> Adam
>
> On 08/24/2011 08:34 AM, Vanesa Bdm wrote:
> > Hi Adam, thanks for the answer.
> > I can't make this work.
> > I have 3 shapefiles, a map, a poligon and points of interest.
> > I can draw map and poligon but I can't add the points of interest.
> > If you see the shapefile script MAry worte a function there that I call
> > from aeronavegacion, I load the 2 shapefiles and draw them ok, but how
> > can I add the points also?
> > I attach an image of the map and poligon so you can see that.
> >
> > Cheers
> >
> > > Date: Fri, 19 Aug 2011 14:49:42 -0600
> > > From: asphilli_at_ucar.edu
> > > To: ncl-talk_at_ucar.edu
> > > Subject: Re: [ncl-talk] Add points of interes to a background map
> > >
> > > You're having trouble with shapefiles_point.ncl, correct?
> > >
> > > If so, then I think I know what the problem is. You need to add:
> > > res_at_gsnDraw = False ; do not draw the plot
> > > res_at_gsnFrame = False ; do not advance the frame (=flip the page)
> > >
> > > You correctly call draw(map) and frame(wks) after the polymarkers are
> > > drawn, but you need to tell NCL to not draw the plot or advance the
> > > frame until the polymarkers are drawn. Without that, any polymarkers
> > > will not be added properly.
> > >
> > > Note that in your aeornavegacion_300.ncl script, you set
> > > pltres_at_PanelPlot = True. What this does (behind the scenes) is to set
> > > gsnDraw = False and gsnFrame = False when you call the WRF plotting
> > > function wrf_map_overlays, which again is a necessary precondition to
> > > using any of the gsn_add_* functions..
> > >
> > > Hope that helps! Adam
> > >
> > > On 08/19/2011 02:14 PM, Vanesa Bdm wrote:
> > > > Hello a few months ago, Mary and Dennis help me to add a backgrond map
> > > > to my scripts.
> > > > Now I need to add towns (points of interest).
> > > > I can do exactly that but separetly, I edit shapiles_6.ncl and I
> > can see
> > > > all my points, and I try, but with no success to add those points to my
> > > > script so I can see all together.
> > > >
> > > > Any ideas?
> > > >
> > > > Cheers
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > ncl-talk mailing list
> > > > List instructions, subscriber options, unsubscribe:
> > > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> > >
> > > --
> > > ______________________________________________________________
> > > Adam Phillips asphilli_at_ucar.edu
> > > NCAR/Climate and Global Dynamics Division (303) 497-1726
> > > P.O. Box 3000
> > > Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli
> > > _______________________________________________
> > > 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
>
> --
> ______________________________________________________________
> Adam Phillips asphilli_at_ucar.edu
> NCAR/Climate and Global Dynamics Division (303) 497-1726
> P.O. Box 3000
> Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli
> _______________________________________________
> 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
This archive was generated by hypermail 2.1.8 : Mon Aug 29 2011 - 21:44:22 MDT