[ncl-talk] Point rainfall overlayed over the tearin data
Mary Haley
haley at ucar.edu
Tue Nov 3 12:16:45 MST 2015
Geeta,
The "overlay" procedure is for overlaying one plot on another, like
overlaying a contour plot on a map plot, or a contour plot on a vector
plot, or an XY plot on another XY plot.
When you call gsn_add_polyxxxx, this is *not* returning a plot. It is
simply returning an identifier that represents the primitives that you just
attached to the plot. You cannot overlay this on a plot, and, you don't
need to because gsn_add_polyxxx actually attaches the primitives to the
given plot.
So, when you call:
plot_stn@$str$ = gsn_add_polymarker
(wks,plot_stn,lon(rf0),lat(rf0),res_mark)
This is attaching the markers to "plot_stn", and now all you need to do is
draw "plot_stn" and you will see the plot and the markers that were just
added. You need remove the "overlay" call:
plot_stn@$str$ =
gsn_add_polymarker(wks,plot_stn,lon(rf0),lat(rf0),res_mark)
draw(plot_stn)
frame(wks)
However, I'm confused by your script, because it appears you are first
creating and drawing some filled contours. You then create a new map and
attach some markers to it and draw that. Is this what you are trying to
do, or did you want the contours to be over a map, and the markers on top
of that?
I've attached a modified version of your script that:
- Calls wrf_map_overlays instead of wrf_overlays, in order to create
contours over a map
- Sets the special "PanelPlot" resource to True so wrf_map_overlays
doesn't remove the contours from the map.
- Attaches one marker to the WRF plot (I used some dummy values since I
don't have your data file)
- Draws the final plot.
This is mainly to show how to properly add markers to a WRF plot, if that's
what you are trying to do.
--Mary
On Mon, Nov 2, 2015 at 9:07 AM, Geeta Geeta <geetag54 at yahoo.com> wrote:
> Hi all.
> I have to plotted station rainfall & terain (height) data together. (using
> two scripts).
> The terain data is plotted using the wrf_map_overlay function. while for
> stn rainfall another script is being used. i combined the two scripts to
> see if my purpose is solved.
> but when I overlay one plot over the other, I am unable to get the two
> together.
>
>
> I have used the overlay function like this.
>
> draw(plot_stn)
> overlay(plot,plot_stn)
> frame(wks)
> end
>
>
> Pls suggest. Script is attatched.
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151103/6a70a1a4/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: terain-stn-v1_mod.ncl
Type: application/octet-stream
Size: 2734 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151103/6a70a1a4/attachment.obj
More information about the ncl-talk
mailing list