The VCS module is designed to provide access to the VCS graphical interface.
###The VCS Graphics Module
VCS is UV-CDAT’s interface to a library for two-dimensional graphics that has
been particularly customized for climate data but which in fact can be used by
many scientific applications. VCS has a rich set of facilities that allow you
to easily make sophisticated presentation graphics.
VCS as a module has the principal function init() which returns a Canvas
object. The rest of the commands are methods on the Canvas object. Up to 8
canvases can be active at one time.
Command
Description
Examples
init()
Initializes and creates a VCS object, reads in the initial.attribute file and set up the VCS default values.
Note: The number of VCS Canvases is limited to eight.
help()
Gives insight to other VCS functions by providing a description and at least one example.
objecthelp()
Print out information on VCS objects. See example on its use.
plot()
Plot an array(s) of data given a template and graphics method.
clear()
This routine will remove all plots on the VCS Canvas.
mode()
Updating of the graphical displays on the VCS Canvas can be deferred until a later time.
update()
If a series of commands are given to VCS and the Canvas Mode is set to manual, then use this function to update the VCS Canvas manually.
open()
Open VCS Canvas object. This routine really just manages the VCS canvas. It will popup the VCS Canvas for viewing. It can be used to display only the VCS Canvas.
close()
Close the VCS Canvas. It will remove the VCS Canvas object from the screen, but not deallocate it.
portrait()
Change the VCS Canvas orientation to Portrait.
landscape()
Change the VCS Canvas orientation to Landscape.
page()
Change the VCS Canvas orientation to either 'portrait' or 'landscape'.
geometry()
The geometry command is used to set the size and position of the VCS canvas.
printer()
his function creates a temporary cgm file and then sends it to the specified printer.
gif()
Generate a gif file
postscript()
Generate a postscript file.
cgm()
Generate a cgm file.
raster()
Generate a raster file.
pstogif()
Converts a postscript file to a gif file.
boxfill()
Generate a boxfill plot given the data, boxfill graphics method, and template.
continents()
Generate a continents plot given the continents graphics method, and template.
isofill()
Generate a isofill plot given the data, isofill graphics method, and template.
isoline()
Generate a isoline plot given the data, isoline graphics method, and template.
outfill()
Generate a outfill plot given the data, outfill graphics method, and template.
outline()
Generate a outline plot given the data, outline graphics method, and template.
scatter()
Generate a scatter plot given the data, scatter graphics method, and template.
vector()
Generate a vector plot given the data, vector graphics method, andtemplate.
xvsy()
Generate a XvsY plot given the data, XvsY graphics method, and template.
xyvsy()
Generate a Xyvsy plot given the data, Xyvsy graphics method, and template.
yxvsx()
Generate a Yxvsx plot given the data, Yxvsx graphics method, and template.
graphicsmethodname()
Returns the grapics method's type string: boxfill, isofill, isoline, outfill, outline, continents, scatter, vector, xvsy, xyvsy, or yxvsx.
getcontinentstype()
Return continents type from VCS. Remember the value can only be between 0 and 11.
isgraphicsmethod()
Indicates if the entered argument is one of the following graphics methods: boxfill, isofill, isoline, outfill, outline, continents, scatter, vector, xvsy, xyvsy, yxvsx.
isboxfill()
Check to see if an object is a VCS primary boxfill graphics method object.
iscontinents()
Check to see if an object is a VCS primary continents graphics method.
isisofill()
Check to see if an object is a VCS primary isofill graphics method.
isisoline()
Check to see if an object is a VCS primary isoline graphics method.
isoutfill()
Check to see if this object is a VCS primary outfill graphics method.
isoutline()
Check to see if an object is a VCS primary outline graphics method.
isvector()
Check to see if an object is a VCS primary vector graphics method.
isxvsy()
Check to see if an object is a VCS primary xvsy graphics method.
isxyvsy()
Check to see if an object is a VCS primary Xyvsy graphics method.
isyxvsx()
Check to see if an object is a VCS primary yxvsx graphics method.
istemplate()
Indicates if the entered argument a template.
issecondaryobject()
Query to see if an object is a secondary object.
isfillarea()
Check to see if an object is a VCS secondary fillarea.
isline()
Check to see if this object is a VCS secondary line.
ismarker()
Check to see if this object is a VCS secondary marker.
istextcombined()
Check to see if an object is a VCS secondary text combined.
istextorientation()
Check to see if an object is a VCS secondary text orientation.
istexttable()
Check to see if an object is a VCS secondary text table.
listelements()
Returns a Python list of all the VCS class objects.
show()
Show the list of VCS primary and secondary class objects.
createboxfill()
Create a new boxfill graphics method given the name and the existingboxfill graphics method to copy the attributes from.
getboxfill()
This function will create a boxfill class object from an existing VCS boxfill graphics method.
createcontinents()
Create a new continents graphics method given the the name and the existing continents graphics method to copy the attributes from.
getcontinents()
This function will create a continents class object from an existing VCS continents graphics method.
createisofill()
Create a new isofill graphics method given the the name and the existing isofill graphics method to copy the attributes from.
getisofill()
This function will create a isofill class object from an existing VCS isofill graphics method.
createisoline()
Create a new isoline graphics method given the the name and the existing isoline graphics method to copy the attributes from.
getisoline()
This function will create a isoline class object from an existing VCS isoline graphics method.
createoutfill()
Create a new outfill graphics method given the the name and the existing outfill graphics method to copy the attributes from.
getoutfill()
This function will create a outfill class object from an existing VCS outfill graphics method.
createoutline()
Create a new outline graphics method given the the name and the existing outline graphics method to copy the attributes from.
getoutline()
This function will create a outline class object from an existing VCS outline graphics method.
createscatter()
Create a new scatter graphics method given the the name and the existing mscatter graphics method to copy the attributes from.
getscatter()
This function will create a scatter class object from an existing VCS scatter graphics method.
createvector()
Create a new vector graphics method given the the name and the existing vector graphics method to copy the attributes from.
getvector()
This function will create a vector class object from an existing VCS vector graphics method.
createxvsy()
Create a new XvsY graphics method given the the name and the existing XvsY graphics method to copy the attributes from.
getxvsy()
This function will create a XvsY class object from an existing VCS XvsY graphics method.
createxyvsy()
Create a new Xyvsy graphics method given the the name and the existing Xyvsy graphics method to copy the attributes from.
getxyvsy()
This function will create a Xyvsy class object from an existing VCS Xyvsy graphics method.
createyxvsx()
Create a new Yxvsx graphics method given the the name and the existing Yxvsx graphics method to copy the attributes from.
getyxvsx()
This function will create a Yxvsx class object from an existing VCS Yxvsx graphics method.
createtemplate()
Create a new template given the the name and the existing template to copy the attributes from.
gettemplate()
his function will create a template class object from an existing VCS template.
setcolormap()
This routine will change the VCS color map.
setcolorcell()
Set a individual color cell in the active colormap. If default is the active colormap, then return an error string.
colormapgui()
Run the VCS colormap interface.
The colormapgui command is used to bring up the VCS colormap interface. The interface is used to select, create, change, or remove colormaps.
Note:
The colormapgui GUI will only work for 8-bit 'Pseudo Color'.
createfillarea()
Create a new fillarea secondary method given the the name and the existing fillarea secondary method to copy the attributes from.
getfillarea()
This function will create a fillarea class object from an existing VCS fillarea secondary method.
createline()
Create a new line secondary method given the the name and the existing line secondary method to copy the attributes from.
getline()
This function will create a line class object from an existing VCS line secondary method.
createmarker()
Create a new marker secondary method given the the name and the existing marker secondary method to copy the attributes from.
getmarker()
This function will create a marker class object from an existing VCS marker secondary method.
createtextcombined()
Create a new textcombined secondary method given the the names and the existing texttable and textorientation secondary methods to copy the attributes from. I
gettextcombined()
This function will create a textcombined class object from an existing VCS texttable secondary method and an existing VCS textorientation secondary method.
createtextorientation()
Create a new textorientation secondary method given the the name and he existing textorientation secondary method to copy the attributes from.
gettextorientation()
This function will create a textorientation class object from an existing VCS textorientation secondary method.
createtexttable()
Create a new texttable secondary method given the the name and the existing texttable secondary method to copy the attributes from.
gettexttable()
This function will create a texttable class object from an existing VCS texttable secondary method.
removeobject()
This function allows the user to remove these objects from the appropriate class list.
Note, To remove the object completely from Python, remember to use the "del" function.
Also note, The user is not allowed to remove a "default" class object.
setcontinentstype()
One has the option of using continental maps that are predefined or that are user-defined. Predefined continental maps are either internal to VCS or are specified by external files. (The continents type number ranges from 0 to 11.)
set()
Set the default VCS primary class objects: template and graphics methods.
animate()
Animate the contents of the VCS Canvas. Currently, only one display can be shown in the VCS Canvas for the animation to work. This function pops up the animation GUI.
Note:
The animation GUI will only work for 8-bit 'Pseudo Color'.
flush()
The flush command executes all buffered X events in the que.
grid()
Set the default plotting region for variables that have more dimension values than the graphics method. This will also be used for animating plots over the third and fourth dimensions.
resetgrid()
Set the plotting region to default values. That is, let the variable's dimension values determine the grid.