Resizing
gsnPaperMargin: Allows the user to specify the margin left around the page. This is useful since most postscript printers have their own intrinsic margins. Default = 0.5
resize_1.ncl: The resource gsnMaximize will automatically enlarge a
postscript, ngcm, or X11 plot to fill a page or window. Here is
demonstrated for postscript files.
Download ps plot with gsnMaximize
Download plot with default sizing
For a single plot, place gsnMaximize in with the regular plot resources.
A note about adding text: If you desire to add text using gsn_text etc, to a panel plot that is being maximized, please do so after the call to gsn_panel. The moment you call gsn_text, you freeze the device coordinates of the plot, which means it will not be maximized if placed before the call to gsn_panel.
resize_2.ncl: How to add a time
stamp to a page that is maximized.
gsnMaximize, works on the entire plot. If you try to enlarge the plot and then add text to it after the fact, it will not see the text and only enlarge the original plot. This will push the text off the page. We get around this by telling gsnMaximize that we anticipate placing text at the bottom of the page by allocating space for it using gsnPanelBottom = 0.05.
resize_3.ncl: How to change the
aspect ratio of a map plot.
mpShapeMode = "FreeAspect"
vpWidthF = 0.8
vpHeightF = 0.4
Allows the user to change the aspect ratio of a map plot. For plain contour plots, the ShapeMode resource is not required. For maps, unless ShapeMode is included, the plot manager will try to maintain the aspect ratio of the plot regardless of the values you input for Height and Width.
resize_4.ncl: Creating a automatic
landscape plot.
Download ps plot with gsnPaperOrientation = "auto"
gsnPaperOrientation allows the user to either specify a "landscape" or "portrait" orientation. Setting this resource to "auto" allows NCL to choose which orientation will make the plot larger. In the case of this single cylindrical equidistant plot, that orientation would be landscape. Note that gsnMaximize must also be set to true.
resize_5.ncl: Creates a plot larger
than 8.5 x 11.
gsnPaperWidth and gsnPaperHeight can be used to set the size of the plot to any value desired.
Note about view this large ps file: You must use ghostview and use the media pull down menu to set the page size. This will enable scroll bars that all you to view the entire image.
You can only create large plots such as this in ".ps" mode. The bounding box in the NCL ".eps" file is hard-wired to 8.5 x 11, and you will not be able to view the entire image.
resize_7.ncl: Uses the procedure
maximize_output to maximize a panel
plot created using viewport specifications.
