From: <ai...@us...> - 2013-09-26 21:59:59
|
Revision: 12535 http://sourceforge.net/p/plplot/code/12535 Author: airwin Date: 2013-09-26 21:59:56 +0000 (Thu, 26 Sep 2013) Log Message: ----------- Add an additional array to demoArray which contains flags to store which pages of each example are displayed on the website. But for now this extra array is not used (see ToDo below). Add an entry in demoArray for example 00 Change demoArray to allow 100 pages for example 33 Drop f77 and Perl/PDL from list of languages whose source code is displayed for each example. ToDo. Implement using the extra array in demoArray to control which pages are displayed on the website. Modified Paths: -------------- trunk/www/examples.php Modified: trunk/www/examples.php =================================================================== --- trunk/www/examples.php 2013-09-26 21:51:35 UTC (rev 12534) +++ trunk/www/examples.php 2013-09-26 21:59:56 UTC (rev 12535) @@ -2,78 +2,81 @@ include "corefunctions.php"; # Each element of the structure below contains: - # [ demo#, number of pages, particular thumbnail for top-level page, credits] + # [ demo#, number of pages, particular thumbnail for top-level page, credits, logical array indicating which pages to display] # if number of pages==0 the entry is ignored (currently none are ignored). $demoArray = array( + array( 0, 1, 1, " + <p>Simplest tutorial demo of a 2D line plot.</p> + \n", array_fill( 0, 1, 1)), array( 1, 1, 1, " <p>Simple line plot and multiple windows demo.</p> - \n"), + \n", array_fill( 0, 1, 1)), array( 2, 2, 1, " <p>Multiple window and color map 0 demo.</p> - \n"), + \n", array_fill( 0, 2, 1)), array( 3, 1, 1, " <p>Polar plot demo.</p> - \n"), + \n", array_fill( 0, 1, 1)), array( 4, 2, 1, " <p>Log plot demo.</p> - \n"), + \n", array_fill( 0, 2, 1)), array( 5, 1, 1, " <p>Histogram demo.</p> - \n"), + \n", array_fill( 0, 1, 1)), array( 6, 5, 1, " <p>Symbol demo.</p> - \n"), + \n", array_fill( 0, 5, 1)), array( 7, 19, 1, " <p>Font demo for Hershey encodings.</p> - \n"), + \n", array_fill( 0, 19, 1)), array( 8, 8, 1, " <p>3-d plot demo.</p> - \n"), + \n", array_fill( 0, 8, 1)), array( 9, 5, 1, " <p>Contour plot demo.</p> - \n"), + \n", array_fill( 0, 5, 1)), array(10, 1, 1, " <p>Window positioning demo.</p> - \n"), + \n", array_fill( 0, 1, 1)), array(11, 8, 1, " <p>Mesh plot demo.</p> - \n"), + \n, array_fill( 0, 8, 1)"), array(12, 1, 1, " <p>Bar chart demo.</p> - \n"), + \n", array_fill( 0, 1, 1)), array(13, 1, 1, " <p>Pie chart demo.</p> - \n"), + \n", array_fill( 0, 1, 1)), array(14, 4, 1, " <p>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.</p> - \n"), + \n", array_fill( 0, 4, 1)), array(15, 3, 1, " <p>Shade plot demo using color map 0 (discrete colors) (plshade).</p> - \n"), + \n", array_fill( 0, 3, 1)), array(16, 5, 1, " <p>Shade plot demo using color map 1 (continuous colours) (plshades).</p> - \n"), + \n", array_fill( 0, 5, 1)), array(17, 1, 1, " <p>4-pen strip chart demo.</p> - \n"), + \n", array_fill( 0, 1, 1)), array(18, 8, 1, " <p>3-d line and point plot demo.</p> - \n"), + \n", array_fill( 0, 8, 1)), array(19, 4, 1, " <p>Demo of backdrop plotting of world, US maps.</p> - \n"), + \n", array_fill( 0, 4, 1)), array(20, 6, 3, " <p>Demo of gray-scale image manipulation (plimage).</p> - \n"), + \n", array_fill( 0, 6, 1)), array(21, 3, 3, " <p>Grid data demo.</p> - \n"), + \n", array_fill( 0, 3, 1)), array(22, 4, 3, " <p>Demo of simple vector plotting.</p> - \n"), + \n", array_fill( 0, 4, 1)), array(23, 16, 1, " <p>Font demo for unicode encodings which shows Greek letters and math symbols.</p> - \n"), + \n", array_fill( 0, 16, 1)), array(24, 1, 1, " <p>Demo of unicode Pace Flag.</p> <p>Credits:</p> @@ -81,13 +84,13 @@ <li><a href=\"http://www.columbia.edu/~fdc/pace/\">Say Peace in all languages!</a></li> <li><a href=\"http://www.columbia.edu/~fdc/pace/flag.html\">Pace flag</a></li> </ul> - \n"), + \n", array_fill( 0, 1, 1)), array(25, 8, 1, " <p>Diagnostic demo of filling and clipping polygons.</p> - \n"), + \n", array_fill( 0, 8, 1)), array(26, 2, 1, " <p>Demo of multi-lingual unicode versions of the first page of example 4.</p> - \n"), + \n", array_fill( 0, 2, 1)), array(27, 19, 1, " <p>Demo of drawing and filling 'spirograph' curves - epitrochoids, cycolids, roulettes. We have specified the general @@ -99,25 +102,25 @@ much larger fraction of the complex spirographic curve would be filled). </p> - \n"), + \n", array_fill( 0, 19, 1)), array(28, 5, 1, " <p>Demo of 3-d writing of text (plmtex3 and plptex3).</p> - \n"), + \n", array_fill( 0, 5, 1)), array(29, 10, 1, " <p>Demo of date / time formatting for axes.</p> - \n"), + \n", array_fill( 0, 10, 1)), array(30, 2, 1, " <p>Demo of opacity/ transparency (or alpha channel).</p> - \n"), + \n", array_fill( 0, 2, 1)), array(31, 1, 1, " <p>Diagnostic demo to exercise all our set/get functions. The result should be a properly-formatted empty plot with black background.</p> - \n"), + \n", array_fill( 0, 1, 1)), array(32, 1, 1, " <p>Demo of how to draw box-whisker / candlestick plots using PLplot. These are commonly used for financial data.</p> - \n"), - array(33, 4, 1, " - <p>Demo of legends.</p> - \n")); + \n", array_fill( 0, 1, 1)), + array(33, 100, 1, " + <p>Demo of legends and colorbars.</p> + \n", array_fill( 0, 100, 1))); ?> <!-- include the html header --> @@ -134,15 +137,16 @@ <div id="contentwrapper"> <div id="fullside"> <?php + // if the variable demo was set the source code of this example // is displayed if(isset($_GET["demo"])) { $demoID=$_GET["demo"]; // demo number $lbind=$_GET["lbind"]; // language - $demo_str = sprintf("%02d", $demoArray[$demoID-1][0]); - $nplots = $demoArray[$demoID-1][1]; - $credits = $demoArray[$demoID-1][3]; - $demo_dir = "examples-data/demo$demo_str"; + $demo_str = sprintf("%02d", $demoArray[$demoID-0][0]); + $nplots = $demoArray[$demoID-0][1]; + $credits = $demoArray[$demoID-0][3]; + $demo_dir = "examples-data/demo$demo_str"; // add buttons for language selection echo <<<END @@ -154,12 +158,10 @@ <input type="submit" name="lbind" value="Ada(thin)" /> <input type="submit" name="lbind" value="C" /> <input type="submit" name="lbind" value="C++" /> - <input type="submit" name="lbind" value="F77" /> <input type="submit" name="lbind" value="F95" /> <input type="submit" name="lbind" value="Java" /> <input type="submit" name="lbind" value="Ocaml" /> <input type="submit" name="lbind" value="Octave" /> - <input type="submit" name="lbind" value="PerlDL" /> <input type="submit" name="lbind" value="Python" /> <input type="submit" name="lbind" value="Tcl" /> </form> @@ -170,12 +172,10 @@ case ("Ada(thin)"): $fname = "x" . $demo_str . "a.adb-"; break; case ("C"): $fname = "x" . $demo_str . "c.c-"; break; case ("C++"):$fname = "x" . $demo_str . ".cc-"; break; - case ("F77"): $fname = "x" . $demo_str . "f.f-"; break; case ("F95"): $fname = "x" . $demo_str . "f.f90-"; break; case ("Java"): $fname = "x" . $demo_str . ".java-"; break; case ("Ocaml"): $fname = "x" . $demo_str . ".ml-"; break; case ("Octave"): $fname = "x" . $demo_str . "c.m-"; break; - case ("PerlDL"): $fname = "x" . $demo_str . ".pl-"; break; case ("Python"): $fname = "xw" . $demo_str . ".py-"; break; case ("Tcl"): $fname = "x" . $demo_str . ".tcl-"; break; default: $fname = "x" . $demo_str . "c.c-"; @@ -216,7 +216,7 @@ echo <<<END <h3>Examples</h3> <p>These examples were generated with the pngcairo device and - reflect the status of PLplot-5.9.9.</p> + reflect the status of PLplot-5.9.10.</p> <p>Select a thumbnail to view full-size image and source code.</p> <p> END; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |