Blame | Last modification | View Log | RSS feed
This is the README file for PHPlotLast updated for PHPlot-6.2.0 on 2015-11-03The project web site is http://sourceforge.net/projects/phplot/The project home page is http://phplot.sourceforge.net/-----------------------------------------------------------------------------OVERVIEW:PHPlot is a PHP class for creating scientific and business charts.The release documentation contains only summary information. For morecomplete information, download the PHPlot Reference Manual from theSourceforge project web site. You can also view the manual online athttp://phplot.sourceforge.netFor information about changes in this release, including any possibleincompatibilities, see the NEWS.txt file.CONTENTS:COPYING . . . . . . . . . . . . LGPL 2.1 License fileChangeLog . . . . . . . . . . . Lists changes to the sourcesNEWS.txt . . . . . . . . . . . . Highlights changes in releasesNEWS_*.txt . . . . . . . . . . . Older NEWS filesREADME.txt . . . . . . . . . . This filecontrib . . . . . . . . . . . . "Contributed" directory, add-onsphplot.php . . . . . . . . . . The main PHPlot source filergb.inc.php . . . . . . . . . . Optional extended color tableREQUIREMENTS:You need a recent version of PHP, and you are advised to use the lateststable release. This version of PHPlot was tested with PHP-5.6.15,PHP-5.5.30, PHP-5.4.45, and also with the pre-release PHP-7.0.0RC6.(Windows testing was limited to PHP-5.4.x.)Note: At the time of this release, PHP-5.4.x just entered end-of-life withno expected further support from the PHP Group. This version of PHPlotstill works with PHP-5.4.x, but future versions will probably not betested with or support PHP-5.4.x.At the time of this release, PHP-7 has not yet been released. Thisversion of PHPlot has been tested with a pre-release version of PHP-7,and contains fixes that are required for PHP-7.You need the GD extension to PHP either built in to PHP or loaded as amodule. Refer to the PHP documentation for more information - see theImage Functions chapter in the PHP Manual. We test PHPlot mostly with thePHP-supported, bundled GD library.If you want to display PHPlot charts on a web site, you need a PHP-enabledweb server. You can also use the PHP CLI interface without a web server.PHPlot supports TrueType fonts, but does not include any TrueType font files.If you want to use TrueType fonts on your plots, you need to have TrueTypesupport in GD, and some TrueType font files. (Your operating system mostlikely includes TrueType fonts.) By default, PHPlot uses a simple font whichis built in to the GD library.INSTALLATION:Unpack the distribution. (If you are reading this file, you have probablyalready done that.)Installation of PHPlot simply involves copying two script files somewhereyour PHP application scripts will be able to find them. The scripts are:phplot.php - The main script filergb.inc.php - Optional large color tableMake sure the permissions on these files allow the web server to read them.The ideal place is a directory outside your web server document area,and on your PHP include path. You can add to the include path in the PHPconfiguration file; consult the PHP manual for details.UPGRADING:To upgrade PHPlot, follow the same instructions as for installing. Theremay be changes between releases which can alter the appearance of your plots.Please check the top section in NEWS.txt for details.KNOWN ISSUES:Here are some of the problems we know about in PHPlot. See the bug trackeron the PHPlot project web site for more information.#173 Area fill plots with data borders and overlapping areasNew in release 6.2.0 are data borders for area and squaredarea plot types.With multiple data sets, if the areas overlap, the borders are drawn withoutregard to the overlap, and don't correspond to the visible areas.#171 Dashed patters aren't continuingPHPlot line styles are not being drawn properly when the dashed patternis long relative to the data point spacing.#146 (was: 3142124) Clip plot elements to plot areaPlot elements are not currently clipped to the plot area, and may extendbeyond. PHP does not currently support the GD clipping control.#93 (was: 1605558) Wide/Custom dashed lines don't work wellThere is a question whether this is a PHP/GD issue, or behaving asexpected.PHP Issues:PHP has many build-time and configuration options, and these can affectthe operation of PHPlot (as well as any other application or library). Hereare some known issues:+ If PHP is built with Thread Safety on (ZTS), the GD extension isunable to find TrueType fonts unless the full path is given. (This mightbe a PHP bug.) The text in the PHPlot Reference Manual section"TrueType Font Selection" concerning finding fonts without a path does notwork on these systems. This has been found to affect the version of PHPdistributed with Slackware, but not Ubuntu. It affects the thread-safe PHPWindows release, but not the non-thread-safe (NTS) Windows release.+ Slackware Linux used to include a PHP built with --enable-gd-jis-conv(JIS-mapped Japanese font support). This prevented the usual UTF-8 encodingof characters from working in TrueType Font (TTF) text strings. This doesnot affect recent Slackware, though (14.0 and up).+ The Ubuntu Linux PHP GD package (php5-gd) was built to use the externalshared GD library, not the one bundled with PHP. This can result in smalldifferences in images, and some unsupported features (such as advancedtruecolor image operations). Also, although this Ubuntu GD library wasbuilt with fontconfig support, PHP does not use it, so you still need tospecify TrueType fonts with their actual file names. These also affectUbuntu-derived distributions such as Linux Mint.+ Some PHP installations may have a memory limit set too low to supportlarge images, especially truecolor images.+ The default TrueType font can be changed by external factors. If youenable TrueType fonts, but don't select a font name, PHPlot can find adefault TrueType font on many systems, including Windows. However, theselected font can change if you install or remove software. For example, onWindows, PHPlot may select the Arial font. But then, if you installLibreOffice, the default font will change to Liberation Sans. This willchange plot appearance. This happens because LibreOffice installs theLiberation font family in the Windows fonts directory, and the LiberationSans font precedes Arial in PHPlot's list of candidate default fonts.If you think you found a problem with PHPlot, or want to ask questions orprovide feedback, please use the Help and Discussion forum athttp://sourceforge.net/projects/phplot/If you are sure you have found a bug, you can report it on the Bug trackerat the same web site. There is also a Features Request tracker.TESTING:You can test your installation by creating the following two files somewherein your web document area. First, the HTML file:------------ simpleplot.html ----------------------------<html><head><title>Hello, PHPlot!</title></head><body><h1>PHPlot Test</h1><img src="simpleplot.php"></body></html>---------------------------------------------------------Second, in the same directory, the image file producing PHP script file.Depending on where you installed phplot.php, you may need to specify a pathin the 'require' line below.------------ simpleplot.php -----------------------------<?phprequire 'phplot.php';$plot = new PHPlot();$data = array(array('', 0, 0), array('', 1, 9));$plot->SetDataValues($data);$plot->SetDataType('data-data');$plot->DrawGraph();---------------------------------------------------------Access the URL to 'simpleplot.html' in your web browser. If you see asimple graph, you have successfully installed PHPlot. If you see nograph, check your web server error log for more information.COPYRIGHT and LICENSE:PHPlot is Copyright (C) 1998-2015 Afan OttenheimerThis is free software; you can redistribute it and/ormodify it under the terms of the GNU Lesser General PublicLicense as published by the Free Software Foundation;version 2.1 of the License.This software is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNULesser General Public License for more details.You should have received a copy of the GNU Lesser General PublicLicense along with this software; if not, write to the Free SoftwareFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USANotice: Despite the presence of the letters "PHP" in the name ofPHPlot, it should be apparent that this software is not a productof the PHP Group, is not derived from PHP, and the PHP Group doesendorse and is not responsible for this product.