Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
98 - 1
This is the README file for PHPlot
2
Last updated for PHPlot-6.2.0 on 2015-11-03
3
The project web site is http://sourceforge.net/projects/phplot/
4
The project home page is http://phplot.sourceforge.net/
5
-----------------------------------------------------------------------------
6
 
7
OVERVIEW:
8
 
9
PHPlot is a PHP class for creating scientific and business charts.
10
 
11
The release documentation contains only summary information. For more
12
complete information, download the PHPlot Reference Manual from the
13
Sourceforge project web site. You can also view the manual online at
14
http://phplot.sourceforge.net
15
 
16
For information about changes in this release, including any possible
17
incompatibilities, see the NEWS.txt file.
18
 
19
 
20
CONTENTS:
21
 
22
   COPYING  . . . . . . . . . . . . LGPL 2.1 License file
23
   ChangeLog  . . . . . . . . . . . Lists changes to the sources
24
   NEWS.txt . . . . . . . . . . . . Highlights changes in releases
25
   NEWS_*.txt . . . . . . . . . . . Older NEWS files
26
   README.txt   . . . . . . . . . . This file
27
   contrib  . . . . . . . . . . . . "Contributed" directory, add-ons
28
   phplot.php   . . . . . . . . . . The main PHPlot source file
29
   rgb.inc.php  . . . . . . . . . . Optional extended color table
30
 
31
 
32
REQUIREMENTS:
33
 
34
You need a recent version of PHP, and you are advised to use the latest
35
stable release.  This version of PHPlot was tested with PHP-5.6.15,
36
PHP-5.5.30, PHP-5.4.45, and also with the pre-release PHP-7.0.0RC6.
37
(Windows testing was limited to PHP-5.4.x.)
38
 
39
  Note: At the time of this release, PHP-5.4.x just entered end-of-life with
40
  no expected further support from the PHP Group.  This version of PHPlot
41
  still works with PHP-5.4.x, but future versions will probably not be
42
  tested with or support PHP-5.4.x.
43
 
44
  At the time of this release, PHP-7 has not yet been released.  This
45
  version of PHPlot has been tested with a pre-release version of PHP-7,
46
  and contains fixes that are required for PHP-7.
47
 
48
You need the GD extension to PHP either built in to PHP or loaded as a
49
module. Refer to the PHP documentation for more information - see the
50
Image Functions chapter in the PHP Manual. We test PHPlot mostly with the
51
PHP-supported, bundled GD library.
52
 
53
If you want to display PHPlot charts on a web site, you need a PHP-enabled
54
web server. You can also use the PHP CLI interface without a web server.
55
 
56
PHPlot supports TrueType fonts, but does not include any TrueType font files.
57
If you want to use TrueType fonts on your plots, you need to have TrueType
58
support in GD, and some TrueType font files. (Your operating system most
59
likely includes TrueType fonts.) By default, PHPlot uses a simple font which
60
is built in to the GD library.
61
 
62
 
63
INSTALLATION:
64
 
65
Unpack the distribution. (If you are reading this file, you have probably
66
already done that.)
67
 
68
Installation of PHPlot simply involves copying two script files somewhere
69
your PHP application scripts will be able to find them. The scripts are:
70
     phplot.php   - The main script file
71
     rgb.inc.php  - Optional large color table
72
Make sure the permissions on these files allow the web server to read them.
73
 
74
The ideal place is a directory outside your web server document area,
75
and on your PHP include path. You can add to the include path in the PHP
76
configuration file; consult the PHP manual for details.
77
 
78
 
79
UPGRADING:
80
 
81
To upgrade PHPlot, follow the same instructions as for installing. There
82
may be changes between releases which can alter the appearance of your plots.
83
Please check the top section in NEWS.txt for details.
84
 
85
 
86
KNOWN ISSUES:
87
 
88
Here are some of the problems we know about in PHPlot. See the bug tracker
89
on the PHPlot project web site for more information.
90
 
91
#173 Area fill plots with data borders and overlapping areas
92
  New in release 6.2.0 are data borders for area and squaredarea plot types.
93
  With multiple data sets, if the areas overlap, the borders are drawn without
94
  regard to the overlap, and don't correspond to the visible areas.
95
 
96
#171 Dashed patters aren't continuing
97
  PHPlot line styles are not being drawn properly when the dashed pattern
98
  is long relative to the data point spacing.
99
 
100
#146 (was: 3142124) Clip plot elements to plot area
101
  Plot elements are not currently clipped to the plot area, and may extend
102
  beyond. PHP does not currently support the GD clipping control.
103
 
104
#93 (was: 1605558) Wide/Custom dashed lines don't work well
105
  There is a question whether this is a PHP/GD issue, or behaving as
106
  expected.
107
 
108
 
109
PHP Issues:
110
 
111
PHP has many build-time and configuration options, and these can affect
112
the operation of PHPlot (as well as any other application or library). Here
113
are some known issues:
114
 
115
  + If PHP is built with Thread Safety on (ZTS), the GD extension is
116
unable to find TrueType fonts unless the full path is given. (This might
117
be a PHP bug.) The text in the PHPlot Reference Manual section
118
"TrueType Font Selection" concerning finding fonts without a path does not
119
work on these systems. This has been found to affect the version of PHP
120
distributed with Slackware, but not Ubuntu. It affects the thread-safe PHP
121
Windows release, but not the non-thread-safe (NTS) Windows release.
122
 
123
  + Slackware Linux used to include a PHP built with --enable-gd-jis-conv
124
(JIS-mapped Japanese font support). This prevented the usual UTF-8 encoding
125
of characters from working in TrueType Font (TTF) text strings. This does
126
not affect recent Slackware, though (14.0 and up).
127
 
128
  + The Ubuntu Linux PHP GD package (php5-gd) was built to use the external
129
shared GD library, not the one bundled with PHP. This can result in small
130
differences in images, and some unsupported features (such as advanced
131
truecolor image operations). Also, although this Ubuntu GD library was
132
built with fontconfig support, PHP does not use it, so you still need to
133
specify TrueType fonts with their actual file names. These also affect
134
Ubuntu-derived distributions such as Linux Mint.
135
 
136
  + Some PHP installations may have a memory limit set too low to support
137
large images, especially truecolor images.
138
 
139
  + The default TrueType font can be changed by external factors. If you
140
enable TrueType fonts, but don't select a font name, PHPlot can find a
141
default TrueType font on many systems, including Windows. However, the
142
selected font can change if you install or remove software. For example, on
143
Windows, PHPlot may select the Arial font. But then, if you install
144
LibreOffice, the default font will change to Liberation Sans. This will
145
change plot appearance.  This happens because LibreOffice installs the
146
Liberation font family in the Windows fonts directory, and the Liberation
147
Sans font precedes Arial in PHPlot's list of candidate default fonts.
148
 
149
 
150
 
151
If you think you found a problem with PHPlot, or want to ask questions or
152
provide feedback, please use the Help and Discussion forum at
153
     http://sourceforge.net/projects/phplot/
154
If you are sure you have found a bug, you can report it on the Bug tracker
155
at the same web site. There is also a Features Request tracker.
156
 
157
 
158
TESTING:
159
 
160
You can test your installation by creating the following two files somewhere
161
in your web document area. First, the HTML file:
162
 
163
------------ simpleplot.html ----------------------------
164
<html>
165
<head>
166
<title>Hello, PHPlot!</title>
167
</head>
168
<body>
169
<h1>PHPlot Test</h1>
170
<img src="simpleplot.php">
171
</body>
172
</html>
173
---------------------------------------------------------
174
 
175
Second, in the same directory, the image file producing PHP script file.
176
Depending on where you installed phplot.php, you may need to specify a path
177
in the 'require' line below.
178
 
179
------------ simpleplot.php -----------------------------
180
<?php
181
require 'phplot.php';
182
$plot = new PHPlot();
183
$data = array(array('', 0, 0), array('', 1, 9));
184
$plot->SetDataValues($data);
185
$plot->SetDataType('data-data');
186
$plot->DrawGraph();
187
---------------------------------------------------------
188
 
189
Access the URL to 'simpleplot.html' in your web browser. If you see a
190
simple graph, you have successfully installed PHPlot. If you see no
191
graph, check your web server error log for more information.
192
 
193
 
194
COPYRIGHT and LICENSE:
195
 
196
PHPlot is Copyright (C) 1998-2015 Afan Ottenheimer
197
 
198
This is free software; you can redistribute it and/or
199
modify it under the terms of the GNU Lesser General Public
200
License as published by the Free Software Foundation;
201
version 2.1 of the License.
202
 
203
This software is distributed in the hope that it will be useful,
204
but WITHOUT ANY WARRANTY; without even the implied warranty of
205
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
206
Lesser General Public License for more details.
207
 
208
You should have received a copy of the GNU Lesser General Public
209
License along with this software; if not, write to the Free Software
210
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
211
 
212
   Notice: Despite the presence of the letters "PHP" in the name of
213
   PHPlot, it should be apparent that this software is not a product
214
   of the PHP Group, is not derived from PHP, and the PHP Group does
215
   endorse and is not responsible for this product.
216