Go to Google Home
A data-code-compute resource for research and education in information visualization
InfoVis Home Learning Modules Software Databases Compute Resources References

Learning Modules > Chizu Tutorial

Download Information | File Data Format | Execution | Advanced Features | Applications | References

Download Information

Chizu is a Perl application developed by Mark Meiss for generating geospatial visualizations. To install Chizu:

1) Make sure you have Perl and GD (Perl interface to GD Graphics Library) installed (this is available on ella.slis.indiana.edu).

2) Download Chizu scripts.

3) Download the following GIS data files and font files in terms of your project needs (for instance, the U.S. State Boundaries and the Zip Location Database are useful if you want to produce GIS visualizations within US):


GIS Data



File Data Format

Chizu accepts the following scripting commands for rendering maps:

# ABS_NODE <color_in> <color_out> <size> <region> <point>
# ABS_PATH <start> <end> <color> <width> <region> <point1> ...
# ARC <xc> <yc> <width> <height> <start> <end>
# BOX <x1> <y1> <x2> <y2>
# COLOR <name> <r> <g> <b> {<a>}
# DRAW_LABEL <color> <size>
# DRAW_LOC <color_in> <color_out> <min_size> <max_size>
# DRAW_PATH <color> <min_size> <max_size>
# FILL_AREA <region> <point> <fill_color>
# FILL_BOUND <region> <point> <fill_color> <border_color>
# FONT <name> <path>
# GCIRCLE <lon1> <lat1> <lon2> <lat2>
# GRADIENT <name> <r1> <g1> <b1> <r2> <g2> <b2> {<a>}
# IMAGE <path> <x1> <y1> <x2> <y2>
# LABEL <region> <loc> <position> <text>
# LINE <x1> <y1> <x2> <y2>
# PALETTE <year> <color>
# PATH <start> <end> <region> <point1> ...
# PEN <color> <width> <smooth>
# PLOT <region> <path>
# RECT <x1> <y1> <x2> <y2>
# REGION <name> <x1> <y1> <x2> <y2> <lon1> <lat1> <lon2> <lat2>
# SET <name> <value>
# TEXT <x> <y> <font> <size> <justify> <string>
# ZIP <path>

Here is an example of drawing a few nodes, edges, and labels on a US map:

  # Define colors called "white", "red", "green", "blue", and "black"
COLOR white 255 255 255
COLOR red 255 0 0
COLOR green 0 255 0
COLOR blue 0 0 255
COLOR black 0 0 0

# Draw the background
PEN white 1 no
RECT 0 0 1 1

# Draw the US map (black border lines)
REGION usa 0.0 0.28 1.0 0.72 -134 50 -57 24.5
PEN black 1 yes
PLOT usa gis/us_state.dat

# Pre-load ZIP data
ZIP gis/zip_location.dat

# Paint background color "green" for Indiana
# with any zip code within the state (e.g., 47405)
FILL_AREA usa z:47405 green

# Define nodes on specific locations using zip codes
ABS_NODE red red 30 usa z:02114 #Harvard Univ
ABS_NODE red red 20 usa z:94103 #UNIV CALIF SAN FRANCISCO
# Draw the nodes
# size 0 by default to prevent from drawing nodes for past locations
DRAW_LOC red red 0 0

# Define a path (edge)
ABS_PATH 1 1 blue 3 usa z:02114 z:94103
# Draw the path (edge)
PEN blue 2 no
DRAW_PATH blue 0 0

# Pre-load label fonts
FONT label font/font.ttf

# Define labels
# DR: bottom right; UL: upper left;
# Draw the labels
PEN blue 1 yes
DRAW_LABEL label 0.02 blue

This example can be downloaded at: test.cz.

Chizu Execution

Once you have a scripting file, e.g., test.cz, you can save it in the directory where chizu.pl is. Then go to the directory, make sure all needed data files are available in the gis/ and fonts/ subdirectories, and execute the following command line:

./chizu.pl test.cz 800 600 0 0 test.png

This generates the following visualization:

Advanced Features

More Colors

Please consult map color choises, trajectory color choices, type font choises or download an Illustrator 9.0 file with more color choises to ensure legibility.

Gradient colors

Chizu can render gradient colors for paths (edges). To do this, simply define a gradient color as follows:

   GRADIENT blue2red 0 0 255 255 0 0

and use this color for drawing:
   ABS_PATH 1 1 blue2red 3 usa z:02114 z:94103
   PEN blue2red 2 no
   DRAW_PATH blue2red 0 0

An example of this is test2.cz, which produces the following map:

Another advanced example is world.cz, which produces a map of the world.


With Chizu, you can generate higher-resolution images (as long as Chizu does not run out of memory) by changing its execution options. The following command generates a resolution of 2048x1536 in BMP format:

./chizu.pl test.cz 2048 1536 0 0 test.bmp


Chizu was first used by Mark Meiss and Heather Roinestad in their final project for the L579 Information Visualization course. The results of their project and more advanced examples are available at  http://iv.slis.indiana.edu/ref/iv05contest/chizu.

Chizu has been used in the IV Lab's submission to the IEEE InfoVis 2005 Contest. Take a look and you will find interesting features: http://iv.slis.indiana.edu/ref/iv05contest.



This documentation was compiled by Weimao Ke. Color choices were compiled by Shravan Rajagopal.

Information Visualization Cyberinfrastructure @ SLIS, Indiana University
Last Modified Sept 26, 2005