Ngl.overlay
Overlays one plot onto another.
Prototype
Ngl.overlay(PlotId_base, PlotId_overlay)
Arguments
PlotId_baseThe id of the plot you want to overlay PlotId_overlay on.
PlotId_overlayThe id of the plot you want to overlay on PlotId_base.
Return value
NoneDescription
This procedure overlays one plot onto another. The first argument is a PlotId for the base plot and the second is a PlotId for the plot that is to be overlaid onto the base plot.
Ordinarily the base plot will provide the coordinate transformation and data boundaries that together determine where the data coordinate space belonging to the overlay will appear, and how much of it will be visible. If you want to align the overlaid plot in NDC space with the base plot, then set the resource tfDoNDCOverlay to True (this should be a resource of the plot that is being overlaid on the base plot).
It is possible to overlay multiple plots on the same base plot, but you need to call overlay for each plot you want to overlay. When a new plot is overlaid on a base plot that already has other overlaid members, the new plot will be drawn on top of all of the plots currently in the base plot's overlay list.
Map plots cannot be used as overlays to other plots.
You will want to suppress the drawing and frame advance when creating the overlay plots, then drawing the base plot will cause it to be drawn along with all of the overlaid plots.
See Also
Ngl.remove_overlay, Ngl.add_annotation, Ngl.remove_annotation
Examples
See overlay1.py.