Help:JpGraph
From QED
JpGraph is a PHP library that can be used to generate a wide variety of interactive 2-d graphs in PNG format. PHP also serves as the language for constructing the graph.
For a gallery of examples and the PHP instructions that generated them, see QED:Test/JpGraph.
The JpGraph library is available on QED and can be used to generate graphs dynamically. At present, however, because of security concerns, QED pages with PHP code are only interpreted if they are protected. That is, pages with JpGraph instructions will only display graphically if the page is protected.
Once generated, the PNG images are available for use on other pages. To do this requires knowing the name and location of the generated file, which can be determined for example by examining its properties.
Another alternative is to use JpGraph offline to generate images, and then upload the images to QED.
JpGraph on QED
- The PHP5 version of JpGraph is installed on QED.
- Files in the JpGraph library may be included along the lines of the following example: require_once("jpgraph/FOO.php");
- Use imgStroke() instead of Stroke(); imgStroke() creates a named PNG file and inserts the appropriate HTML.
- Use imgStrokeCSIM("") instead of StrokeCSIM(...) for client-side image maps" (interactive images).
- imgStroke accepts <img> arguments presented as a single string, e.g. imgStroke('align="left" width="100px"');
If you just want to generate a PNG file, then use fileStroke(). The returned value is the pathname in a form that is suitable for using with an HTML img tag, e.g.
echo '<img src="' . fileStroke() . '" />';












