Re: Ngl.overlay and Ngl.panel

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 12 Dec 2006 17:20:01 -0700

Hi Ivan,

The problem is that the Ngl,overlay function is not preserving
information about
the contour plot, so the Ngl.panel function doesn't know how to
retrieve contour
level information in order to generate the labelbar.

I think a quick fix will be to do this right after the second
Ngl.overlay call:

    map.contour = cfill.base

Let me know if this doesn't work. I'm assuming the "cfill" contour is
the
one that you want the labelbar information to be generated for.

--Mary

On Dec 12, 2006, at 1:49 PM, Ivan Lima wrote:

> Hi,
>
> I'm trying to create a panel plot containing overlays of filled
> contours and contour lines on a global map. The individual
> maps have the same contour levels so I turn off the labelbar
> for each map and include a single label bar for the panel plot
> with:
>
> pnres.nglPanelLabelBar = True
>
> I can create the individual overlay maps without problems with:
>
> map = Ngl.map(wks,mres)
> cfill = Ngl.contour(wks,workv,cfres)
> cline = Ngl.contour(wks,rmsv,clres)
> Ngl.overlay(map,cfill)
> Ngl.overlay(map,cline)
> maplist.append(map)
>
> But when I try to create the panel plot with:
>
> fig = Ngl.panel(wks,maplist,[2,2],pnres)
>
> I get:
>
> "warning:panel: unrecognized plot type for getting labelbar
> information. Ignoring labelbar request."
>
> And no labelbar is created for the panel plot. Am I doing
> something wrong? Is there a better way to do this?
>
> Thanks,
>
> - Ivan
>
> --
> Ivan Lima
> Woods Hole Oceanographic Institution, MC&G MS #25
> 360 Woods Hole Road, Woods Hole, MA 02543-1543 USA
>
> _______________________________________________
> pyngl-talk mailing list
> pyngl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk

_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Tue Dec 12 2006 - 17:20:01 MST

This archive was generated by hypermail 2.2.0 : Tue Dec 19 2006 - 07:55:51 MST