next up previous contents index
Next: Plotting Data Up: Titles and Axes Previous: Titles and Axes


``Quickplot'' mode

In normal operation, plt performs two passes over its input data. During the first pass, it reads the data from a file or from its standard input, allocates memory sufficient to keep the data to be plotted, and determines suitable axis ranges; during the second pass, plt renders the plot. When making a screen plot, the intermediate steps are not visible; for efficiency, the plt window is not (re)drawn until the entire image has been prepared in memory.

If, however, you specify both x and y axis ranges using any of the -xa, -ya, -X, and -Y options described above, and if you are making only one plot (i.e., not using any of the methods described in chapter 7 to plot multiple data sets on a single set of axes), then plt runs in quickplot mode. In quickplot mode, the data are read and plotted immediately without buffering, so that for large data sets the memory requirements and the time needed to render the plot are significantly reduced. Quickplot mode allows you to plot data sets that are larger than the total amount of available memory. Furthermore, under Unix, GNU/Linux, and Mac OS X, quickplot mode permits progressive display of screen plots, so that you do not need to wait for plt to read an entire multi-megabyte input file before seeing any output. If the data are provided by a pipe from another process, plt can render them in real time (depending on your hardware speed, at rates up to 50 frames per second, or even faster if you change the symbol QPFREQ in xw.c and recompile plt; see appendix F).

Figure 5.3 illustrates the final state of a plot of 25,000 points from a Hénon series. The command used to generate the figure was:

henon | plt % -p s. -X -1.5 1.5 -Y -.5 .5 -t "Henon Attractor"

You can see quickplot mode in action if you compile henon from the source (a file named henon.c, provided in the doc directory of the plt distribution) and then run the command above. Delays are included in henon.c so that you will be able to see what happens even with a fast CPU. Over a period of several seconds, the picture of the Hénon attractor emerges.

Figure 5.3: Hénon attractor, produced in quickplot mode
\begin{figure}\begin{center}
\fcolorbox{blue}{white}{
\epsfig{file=henon,height=8cm}}
\end{center}.
\end{figure}


next up previous contents index
Next: Plotting Data Up: Titles and Axes Previous: Titles and Axes
George B. Moody (george@mit.edu)
2005-04-26