This module discusses how to plot and position your viewable objects on an output workstation. It also discusses how to modify and redraw an object once it has been created.
"vpXF": .4 "vpYF": .6 "vpWidthF": .3 "vpHeightF": .3
would specify that the view object would be displayed with its upper left corner at NDC coordinate (0.4, 0.6) in a square of size 0.3 NDC units.
If vpWidthF and vpHeightF do not specify a square, then the view object will be made to fit into the specified rectangle, unless the viewClass resource vpKeepAspect is set to "True", in which case the view object will be constrained to fit in the largest box, with aspect ratio matching the original shape, that can be inscribed within a box of the specified size. vpKeepAspect is "False" by default, so that a view object will be made to fit the rectangle specified by vpWidthF and vpHeightF.
If the view object is positioned so that part (or all) of it would go outside of NDC limits, then the object is scaled in such a manner to make it fit in NDC space. A warning message is issued in this case.
The NCL expression to use to modify resources in an object that has been created is setvalues. For example, suppose that an XyPlot object has been created and you want to reposition it for plotting to an output workstation. You can do this with the following:
setvalues id_of_object "vpXF": new_xpos "vpYF": new_ypos "vpWidthF": new_width "vpHeightF": new_height end setvalues
NG4.1 Home, Index, Examples, Glossary, Feedback, UG Contents, UG WhereAmI?