Simplest tutorial demo of a 2D line plot.

\n", array_fill( 0, 1, 1)), array( 1, 1, 1, "

Simple line plot and multiple windows demo.

\n", array_fill( 0, 1, 1)), array( 2, 2, 1, "

Multiple window and color map 0 demo.

\n", array_fill( 0, 2, 1)), array( 3, 1, 1, "

Polar plot demo.

\n", array_fill( 0, 1, 1)), array( 4, 2, 1, "

Log plot demo.

\n", array_fill( 0, 2, 1)), array( 5, 1, 1, "

Histogram demo.

\n", array_fill( 0, 1, 1)), array( 6, 5, 1, "

Symbol demo.

\n", array_fill( 0, 5, 1)), array( 7, 19, 1, "

Font demo for Hershey encodings.

\n", array_fill( 0, 19, 1)), array( 8, 10, 1, "

3-d plot demo.

\n", array_fill( 0, 10, 1)), array( 9, 5, 1, "

Contour plot demo.

\n", array_fill( 0, 5, 1)), array(10, 1, 1, "

Window positioning demo.

\n", array_fill( 0, 1, 1)), array(11, 8, 1, "

Mesh plot demo.

\n", array_fill( 0, 8, 1)), array(12, 1, 1, "

Bar chart demo.

\n", array_fill( 0, 1, 1)), array(13, 1, 1, "

Pie chart demo.

\n", array_fill( 0, 1, 1)), array(14, 4, 1, "

Demo of multiple stream/window capability. The two pages of the master stream appear as the first two pages here. The two pages of the slave stream appear as pages 3 and 4 here.

\n", array_fill( 0, 4, 1)), array(15, 3, 1, "

Shade plot demo using color map 0 (discrete colors) (plshade).

\n", array_fill( 0, 3, 1)), array(16, 5, 1, "

Shade plot demo using color map 1 (continuous colours) (plshades).

\n", array_fill( 0, 5, 1)), array(17, 1, 1, "

4-pen strip chart demo.

\n", array_fill( 0, 1, 1)), array(18, 8, 1, "

3-d line and point plot demo.

\n", array_fill( 0, 8, 1)), array(19, 5, 5, "

Demo of map functions.

\n", array_fill( 0, 5, 1)), array(20, 6, 3, "

Demo of gray-scale image manipulation (plimage).

\n", array_fill( 0, 6, 1)), array(21, 3, 3, "

Grid data demo.

\n", array_fill( 0, 3, 1)), array(22, 5, 4, "

Demo of simple vector plotting.

\n", array_fill( 0, 5, 1)), array(23, 16, 1, "

Font demo for unicode encodings which shows Greek letters and math symbols.

\n", array_fill( 0, 16, 1)), array(24, 1, 1, "

Demo of unicode Pace Flag.

Credits:

\n", array_fill( 0, 1, 1)), array(25, 8, 1, "

Diagnostic demo of filling and clipping polygons.

\n", array_fill( 0, 8, 1)), array(26, 2, 1, "

Demo of multi-lingual unicode versions of the first page of example 4.

\n", array_fill( 0, 2, 1)), array(27, 20, 1, "

Demo of drawing and filling 'spirograph' curves - epitrochoids, cycolids, roulettes. We have specified the general PLplot option '-eofill' when generating these figures. That means the spirographic curves will be filled using the even-odd fill rule rather than the (default) non-zero winding number fill rule. The motivation for this choice is the even-odd rule produces more 'interesting' looking results than would be produced by the non-zero rule (where a much larger fraction of the complex spirographic curve would be filled).

\n", array_fill( 0, 20, 1)), array(28, 5, 1, "

Demo of 3-d writing of text (plmtex3 and plptex3).

\n", array_fill( 0, 5, 1)), array(29, 10, 1, "

Demo of date / time formatting for axes.

\n", array_fill( 0, 10, 1)), array(30, 2, 1, "

Demo of opacity/ transparency (or alpha channel).

\n", array_fill( 0, 2, 1)), array(31, 1, 1, "

Diagnostic demo to exercise all our set/get functions. The result should be a properly-formatted empty plot with black background.

\n", array_fill( 0, 1, 1)), array(32, 1, 1, "

Demo of how to draw box-whisker / candlestick plots using PLplot. These are commonly used for financial data.

\n", array_fill( 0, 1, 1)), array(33, 100, 1, "

Subset of the results from the demo of legends and colorbars.

\n", array_fill( 0, 100, 0))); # Overwrite the example 33 pages (currently none) that will be displayed $demoArray[33][4][0] = 1; $demoArray[33][4][1] = 1; $demoArray[33][4][2] = 1; $demoArray[33][4][3] = 1; $demoArray[33][4][4] = 1; $demoArray[33][4][20] = 1; $demoArray[33][4][36] = 1; $demoArray[33][4][52] = 1; $demoArray[33][4][68] = 1; for($ndx = 84; $ndx <= 99; ++$ndx) $demoArray[33][4][$ndx] = 1; ?>
Example $demoID

Select language to see the source code

END; switch($lbind) { case ("Ada(Standard)"): $fname = "xstandard" . $demo_str . "a.adb.txt"; break; case ("Ada(Traditional)"): $fname = "xtraditional" . $demo_str . "a.adb.txt"; break; case ("C"): $fname = "x" . $demo_str . "c.c.txt"; break; case ("C++"):$fname = "x" . $demo_str . ".cc.txt"; break; case ("D"):$fname = "x" . $demo_str . "d.d.txt"; break; case ("Fortran"): $fname = "x" . $demo_str . "f.f90.txt"; break; case ("Java"): $fname = "x" . $demo_str . ".java.txt"; break; case ("Lua"): $fname = "x" . $demo_str . ".lua.txt"; break; case ("Ocaml"): $fname = "x" . $demo_str . ".ml.txt"; break; case ("Octave"): $fname = "x" . $demo_str . "c.m.txt"; break; case ("Python"): $fname = "x" . $demo_str . ".py.txt"; break; case ("Tcl"): $fname = "x" . $demo_str . ".tcl.txt"; break; default: $fname = "x" . $demo_str . "c.c.txt"; } // view code echo "\n"; echo "Your browser is not able to display text!\n\n"; // show plots for chosen example echo "

Select to view full-size image

\n"; echo "

\n"; for($ndx = 1; $ndx <= $nplots; ++$ndx) { if($demoArray[$demoID-0][4][$ndx-1]==1){ $ndx_str = sprintf ("%02d", $ndx); echo " \"x$demo_str.$ndx_str\"/\n"; } } echo "

\n"; // show credits if any if($credits!="") echo "$credits"; echo "

Choose other examples

\n"; foreach($demoArray as $drec) { $dstr = sprintf ("%02d", $drec[0]); if($drec[1]!=0) { if($dstr != $demo_str) { echo "x$dstr\n"; } else { echo "x$dstr\n"; } } } echo "

\n"; } else { // display plots if all examples echo <<Examples

These examples were generated with the pngcairo device and reflect the status of PLplot-5.15.0.

Select a thumbnail to view full-size image and source code.

END; foreach($demoArray as $drec) { $demo_str = sprintf ("%02d", $drec[0]); $dir = "demo$demo_str"; $thumbnail = sprintf ("%02d", $drec[2]); $npages = $drec[1]; if($npages!=0) { echo "\"x$demo_str.thumbnail\"/\n"; } } echo "

"; } ?>