Vvidget Code Reference Manual

Vvidget Code > Programming > Script > Vvizard

The "vvizard" command line interface is a unix utility that can be run from the command line (in Terminal for example) to make graphs. The figure below shows vvizard in use.

Simple Line Graph

As you peruse this manual make special note of each figure. Those figures are automatically processed from scripts and Vvidget Builder documents via the use of vvizard. For example, this command:

find . -name "*.book" -prune -execdir sh convert.sh "{}" \;

Finds all the Vvidget Builder documents used to make figures in this manual and converts them to PNG images which can be displayed by any web browser.

vvizard is useful because it does not require a user interface and does not require an IDE, such as Xcode, to program. In fact, it need not even display a graph and can operate in the background as a service and for automated batch processing.

Launch it using this command:

/Library/Vvidget/Helpers/vvizard

and then type help for additional information. Because vvizard accepts input from stdin, vvizard can be used in shell scripts and other scripting programming environments to make graphs. vvizard is a single unix binary that does not link against any non-system frameworks which means you don't need any additional software (not even Vvidget) to use it, as long as you access a known graphing server (such as at www.vvidget.org).

vvizard is a great way to experiment with the key value encodings described in this manual and it is a great way to pop up a quick graph without needing to become heavy handed with the user interface and programming environments.

The following script, run in the Terminal application, makes a line graph and then exports it to Vvidget Builder:

/Library/Vvidget/Helpers/vvizard
verbose on
server local
reset
add chart_type line
add chart_subtype linear
add chart_format_type default
add title Vvizard Help Example Graph
add x_title My X Title
add y_title My Y Title
add data_1 1 2 2 4 3 6 4 2
add data_2 1 3 2 1.4 3 8.7 4 1.1
display
export

As you can see, you can easily make graphs and then export to Vvidget Builder for final layout.

If you copy the vvizard binary to your unix binpath (say into the directory /usr/bin) then you can execute it just by typing its name. You may wish to link it with a symbolic link so that when you upgrade Vvidget the most current version will always be available in the binpath. To do that type this command:

ln -s /Library/Vvidget/Helpers/vvizard /usr/bin/vvizard

The help command in vvizard gives more explicit information on its commands and use. Run that utility for additional help.

Please help improve this documentation. If a section is hard to understand, there is a typo, you would like a new section added, or you detect any other improvement that can be made then please email support@vvi.com with your information.




© Copyright 1993-2011 by VVimaging, Inc. (VVI); All Rights Reserved. Please email support@vvi.com with any comments you have concerning this documentation. See Legal for trademark and legal information.