next up previous contents
Next: Testing the current status Up: Visualizer Previous: Vehicle output   Contents

Visualization via gnuplot

Gnuplot (www.gnuplot.info) is a plotting package that is available on most linux installations. In the following we will use it for a simple visualization of our traffic simulation results.

First, generate, in the same directory as where you have the vehicle snapshot file, a file named gpl with the following contents:


{}
a=a+1
set grid
set xrange[-50:6050]
set yrange[-50:2050]
print a
plot "T.veh" index a u 12:13 t ""
if ( a < 200 ) reread
a = 0
This assumes that your vehicle snapshot file is called T.veh.

Start gnuplot by typing gnuplot. Inside gnuplot, type


{}
gnuplot> a=1
gnuplot> load 'gpl
The result should be a window similar to Fig. 8.1 displaying the status of the simulation time step by time step.

Figure 8.1: Vehicle snapshot using gnuplot.
\includegraphics[width=0.8\hsize]{gpl-tif.eps}



2004-02-02