98 |
- |
1 |
This is part 1 of the NEWS file for PHPlot, with previous release documentation
|
|
|
2 |
through Release 5.5.0 on 2011-07-30. For current news, see NEWS.txt.
|
|
|
3 |
|
|
|
4 |
The project web site is http://sourceforge.net/projects/phplot/
|
|
|
5 |
The project home page is http://phplot.sourceforge.net/
|
|
|
6 |
Refer the the ChangeLog file for detailed source changes.
|
|
|
7 |
-----------------------------------------------------------------------------
|
|
|
8 |
|
|
|
9 |
2011-07-30 Release 5.5.0
|
|
|
10 |
|
|
|
11 |
Overview:
|
|
|
12 |
|
|
|
13 |
This is the current stable release of PHPlot. This release includes some
|
|
|
14 |
bug fixes and new features. A significant new feature is the ability to
|
|
|
15 |
embed a plot image inside an HTML file. Using this new feature, you can now
|
|
|
16 |
write a single script which produces an HTML page with a PHPlot plot image,
|
|
|
17 |
and avoid having to write separate scripts for the page and plot image.
|
|
|
18 |
|
|
|
19 |
There is also a new 'bubbles' plot type.
|
|
|
20 |
|
|
|
21 |
The PHPlot reference manual has been updated to match this release.
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
Cautions, Important Notes, and Compatibility Issues:
|
|
|
25 |
|
|
|
26 |
Starting in this release, PHPlot more thoroughly checks data arrays for
|
|
|
27 |
validity. Your data array must conform to the requirements in the PHPlot
|
|
|
28 |
Reference Manual, including: the outer array must use only 0-based sequential
|
|
|
29 |
integer indexes, the array values for rows must be arrays, and each row
|
|
|
30 |
array must have a number of elements which is compatible with the data type
|
|
|
31 |
and plot type. PHPlot will now produce an error image if given an invalid
|
|
|
32 |
data array. In previous releases, PHPlot sometimes produced an error image,
|
|
|
33 |
sometimes ignored the invalid entries, but most often it would produce PHP
|
|
|
34 |
warnings or notices about invalid indexes or variable types.
|
|
|
35 |
|
|
|
36 |
Read the notes and warnings in the PHPlot Reference Manual page documenting
|
|
|
37 |
EncodeImage() before using the new 'data URL' feature for embedding PHPlot
|
|
|
38 |
images in HTML files.
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
Bugs Fixed in 5.5.0:
|
|
|
42 |
|
|
|
43 |
#3312134 Allow missing points in OHLC plots:
|
|
|
44 |
Like other plot types, the three OHLC plot types (ohlc, candlesticks, and
|
|
|
45 |
candlesticks2) now allow missing points. Specify all 4 values in the array
|
|
|
46 |
(open, high, low, close) as an empty string (for example) and that point
|
|
|
47 |
will not be plotted.
|
|
|
48 |
|
|
|
49 |
#3312064 PHP errors with invalid data arrays:
|
|
|
50 |
See Compatibility Issues above. PHPlot now checks the data array more
|
|
|
51 |
carefully and rejects invalid arrays without PHP warnings or notices.
|
|
|
52 |
|
|
|
53 |
#3370548 Reverse legend line order for stackedbars:
|
|
|
54 |
A new function SetLegendReverse() was added to control the order of
|
|
|
55 |
text lines (and color boxes) in the legend: top-down (by default),
|
|
|
56 |
or bottom-up. The bottom-up order is more appropriate for stackedbars
|
|
|
57 |
and stackedarea plots, so the legend line order matches the plot.
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
New features in 5.5.0:
|
|
|
61 |
|
|
|
62 |
#3374495 Data URL encoding:
|
|
|
63 |
A New function EncodeImage() was added. It returns the plot image as a
|
|
|
64 |
string, with 3 available encodings: raw, base64, and dataurl.
|
|
|
65 |
The dataurl encoding implements RFC2397 embedding of image data in a URL,
|
|
|
66 |
and allows a single PHP script to produce an HTML page with the plot image
|
|
|
67 |
embedded within. See the PHPlot Reference Manual for details and examples.
|
|
|
68 |
|
|
|
69 |
Also, a new function SetFailureImage() was added. This allows you to
|
|
|
70 |
prevent PHPlot from creating an image with an error message if a fatal
|
|
|
71 |
error occurs. This is meant for use when EncodeImage (rather than
|
|
|
72 |
PrintImage) will be used to produce the plot, but it may be useful in
|
|
|
73 |
other cases too.
|
|
|
74 |
|
|
|
75 |
#3352301 Bubble plots:
|
|
|
76 |
A new plot type 'bubbles' was added, along with a new data type
|
|
|
77 |
'data-data-xyz' for use with this type. A bubble plot is a scatter-plot
|
|
|
78 |
with a Z value at each point controlling the bubble diameter.
|
|
|
79 |
|
|
|
80 |
-----------------------------------------------------------------------------
|
|
|
81 |
|
|
|
82 |
2011-05-27 Release 5.4.0
|
|
|
83 |
|
|
|
84 |
Overview
|
|
|
85 |
|
|
|
86 |
This is the current stable release of PHPlot. This release includes some
|
|
|
87 |
bug fixes and new features. New features include new legend positioning
|
|
|
88 |
modes, legends using point shapes instead of color boxes, and the ability
|
|
|
89 |
to 'anchor' tick marks at a specific value. PHPlot now includes a class
|
|
|
90 |
constant containing the release version as PHPlot::version.
|
|
|
91 |
|
|
|
92 |
The PHPlot reference manual has been updated to match this release.
|
|
|
93 |
|
|
|
94 |
|
|
|
95 |
Cautions, Important Notes, and Compatibility Issues:
|
|
|
96 |
|
|
|
97 |
This release changes legend text positioning. Legend text is now vertically
|
|
|
98 |
centered rather than bottom aligned. This can change the appearance of some
|
|
|
99 |
plots, but the difference is usually not significant. See "Center vertical
|
|
|
100 |
alignment for legend text" below.
|
|
|
101 |
|
|
|
102 |
This release changes how stackedbars plots handle segments of size zero.
|
|
|
103 |
This will change the appearance of some plots, especially if the axis is
|
|
|
104 |
moved from 0. See "Undefined variables with stackedbars" below.
|
|
|
105 |
|
|
|
106 |
|
|
|
107 |
Bugs Fixed in 5.4.0:
|
|
|
108 |
|
|
|
109 |
#3292529 Legend doesn't use data color callback:
|
|
|
110 |
This was determined to be the correct behavior, but undocumented. It has
|
|
|
111 |
now been documented in the reference manual.
|
|
|
112 |
|
|
|
113 |
#3294604 Center vertical alignment for legend text:
|
|
|
114 |
Legend text lines are now centered vertically to the color boxes (or
|
|
|
115 |
point shapes) rather than being bottom aligned. The difference is not
|
|
|
116 |
noticeable with the default font size and line spacing, because there was
|
|
|
117 |
no extra vertical space anyway. But with bigger fonts, and especially with
|
|
|
118 |
additional line spacing, the text now looks better because of the center
|
|
|
119 |
alignment.
|
|
|
120 |
|
|
|
121 |
#3296884 Undefined variable with stackedbars:
|
|
|
122 |
PHPlot will no longer report an undefined variable warning if a stackedbars
|
|
|
123 |
plot starts with a stack containing all zero segments. (This was actually
|
|
|
124 |
fixed in PHPlot-5.3.2.) Furthermore, PHPlot now handles zero segments in
|
|
|
125 |
stackedbars plots differently. Zero values are no longer ignored. An
|
|
|
126 |
initial zero segment will be drawn as a bar segment if the axis is moved in
|
|
|
127 |
the opposite direction to the bar stack direction. A zero at the end will be
|
|
|
128 |
drawn as a cap with the data color, if shading is on.
|
|
|
129 |
|
|
|
130 |
|
|
|
131 |
New features in 5.4.0:
|
|
|
132 |
|
|
|
133 |
#3303654 Force tick mark at specific value:
|
|
|
134 |
New functions SetXTickAnchor() and SetYTickAnchor() were added. These tell
|
|
|
135 |
PHPlot to adjust the first tick mark value so that the specified anchor
|
|
|
136 |
position will coincide with a tick mark and grid position (or it would, if
|
|
|
137 |
the data range were extended to include it). Documentation has been
|
|
|
138 |
updated, including new examples.
|
|
|
139 |
|
|
|
140 |
#3292825 Use point shape markers in legend box:
|
|
|
141 |
New function SetLegendUseShapes() will enable use of point shapes in the
|
|
|
142 |
legend, rather than color boxes. The default is color boxes, so existing
|
|
|
143 |
plots will not change. This only works for points and linepoints plots.
|
|
|
144 |
Documentation has been updated.
|
|
|
145 |
|
|
|
146 |
#3291155 More flexible legend positioning:
|
|
|
147 |
New function SetLegendPosition() allows new ways to position the legend:
|
|
|
148 |
relative to the image, plot area, title, or using world coordinates, with
|
|
|
149 |
an optional pixel offset. There is another new function GetLegendSize() to
|
|
|
150 |
get the legend box size; this can be used to adjust the plot margins if you
|
|
|
151 |
want the legend outside the plot area and inside the margins. Documentation
|
|
|
152 |
has been updated.
|
|
|
153 |
|
|
|
154 |
-----------------------------------------------------------------------------
|
|
|
155 |
|
|
|
156 |
2011-05-06 Release 5.3.2
|
|
|
157 |
|
|
|
158 |
Overview
|
|
|
159 |
|
|
|
160 |
This is the current stable release of PHPlot. This release was produced to
|
|
|
161 |
address a single bug (see below), using a branch off of PHPlot-5.3.1.
|
|
|
162 |
(This is because the current development version, which will become
|
|
|
163 |
PHPlot-5.4.0, already has half of a big two-part change to legend
|
|
|
164 |
processing committed. So the bug fix was released without waiting for the
|
|
|
165 |
new work to be completed.)
|
|
|
166 |
|
|
|
167 |
|
|
|
168 |
Bugs Fixed in 5.3.2:
|
|
|
169 |
|
|
|
170 |
#3296884 "Undefined variable with stackedbars":
|
|
|
171 |
A temporary fix was made against phplot-5.3.1 to avoid an undefined
|
|
|
172 |
variable error when the first stack in a stackedbars plot has all zero
|
|
|
173 |
values. The fix avoids the error message, and the plots are OK in most
|
|
|
174 |
cases. There are still issues with label position, and if the axis
|
|
|
175 |
is moved. These will be addressed in a future fix.
|
|
|
176 |
|
|
|
177 |
|
|
|
178 |
-----------------------------------------------------------------------------
|
|
|
179 |
|
|
|
180 |
2011-01-15 Release 5.3.1
|
|
|
181 |
|
|
|
182 |
Overview:
|
|
|
183 |
|
|
|
184 |
This is the current stable release of PHPlot. This release focuses on
|
|
|
185 |
providing better support and documentation for creating multiple plots on a
|
|
|
186 |
single image.
|
|
|
187 |
|
|
|
188 |
The PHPlot reference manual has been updated to match this release. Some
|
|
|
189 |
new material has been added, including a new section on multiple plots per
|
|
|
190 |
image, and a new example of overlay plots.
|
|
|
191 |
|
|
|
192 |
|
|
|
193 |
Bugs Fixed in 5.3.1:
|
|
|
194 |
|
|
|
195 |
#3143586 "Multiple plots per image - fixes & docs":
|
|
|
196 |
The reference manual now contains a section on multiple plots, and a
|
|
|
197 |
new example. A bug was fixed with SetLegendWorld and multiple plots.
|
|
|
198 |
Image border will now be drawn at most once. It is now possible to
|
|
|
199 |
restore the default 'automatic' behavior for axis positioning. Other
|
|
|
200 |
functions were changed to make arguments optional, so when called with
|
|
|
201 |
no arguments they reset to the default. The reference manual has been
|
|
|
202 |
updated with these changes too.
|
|
|
203 |
|
|
|
204 |
#3147397 "Data colors missing with multiple plots":
|
|
|
205 |
The fix for bug #3049726 "Optimize color allocation" caused a problem
|
|
|
206 |
with multiple plots. This has been fixed. PHPlot will no longer truncate
|
|
|
207 |
the data color table at each plot. It will still only allocate data colors
|
|
|
208 |
as needed, but all of the pre-set or configured data colors will be
|
|
|
209 |
available for each plot.
|
|
|
210 |
|
|
|
211 |
|
|
|
212 |
-----------------------------------------------------------------------------
|
|
|
213 |
|
|
|
214 |
2010-12-04 Release 5.3.0
|
|
|
215 |
|
|
|
216 |
Overview:
|
|
|
217 |
|
|
|
218 |
This is the current stable release of PHPlot. This release includes new
|
|
|
219 |
plot types and some new features.
|
|
|
220 |
|
|
|
221 |
The PHPlot reference manual has been updated to match this release. Some of
|
|
|
222 |
the sections have been moved, there are new examples for the new plot types,
|
|
|
223 |
and a new section on tunable parameters has been added.
|
|
|
224 |
|
|
|
225 |
|
|
|
226 |
New features in 5.3.0:
|
|
|
227 |
|
|
|
228 |
#3093483 "Investing support chart types":
|
|
|
229 |
Added 3 new plot types: Basic OHLC (Open/High/Low/Close), Candlesticks,
|
|
|
230 |
and Filled Candlesticks. These are variations of plots that show the
|
|
|
231 |
performance of a stock or other financial security.
|
|
|
232 |
|
|
|
233 |
#3111166 "Control legend colorbox width":
|
|
|
234 |
It is now possible to control the width of the color boxes in the
|
|
|
235 |
legend, using a class variable which is documented in the manual.
|
|
|
236 |
|
|
|
237 |
#3117873 "Data value labels in more plot types":
|
|
|
238 |
Data value labels, which show the dependent variable values near the
|
|
|
239 |
data points, are now available for more plot types: lines, linepoints,
|
|
|
240 |
points, and squared. (These were previously available only for bars and
|
|
|
241 |
stackedbars plots.)
|
|
|
242 |
|
|
|
243 |
#3127005 "Ability to suppress X/Y axis lines":
|
|
|
244 |
New functions SetDrawXAxis() and SetDrawYAxis() were added to control
|
|
|
245 |
display of the X and Y axis lines. (These lines were probably the only
|
|
|
246 |
PHPlot elements that could not be turned off.) In special cases, these
|
|
|
247 |
can be used to produce a "bare" plot image.
|
|
|
248 |
|
|
|
249 |
|
|
|
250 |
-----------------------------------------------------------------------------
|
|
|
251 |
|
|
|
252 |
2010-10-03 Release 5.2.0
|
|
|
253 |
|
|
|
254 |
Overview:
|
|
|
255 |
|
|
|
256 |
This is the current stable release of PHPlot. This release includes some
|
|
|
257 |
bug fixes and new features, described below, and a reimplementation of
|
|
|
258 |
internal processing of colors.
|
|
|
259 |
|
|
|
260 |
The PHPlot reference manual has been updated to match this release.
|
|
|
261 |
Horizontal plots are now documented in the manual, and the interim
|
|
|
262 |
documentation in the source release (HorizontalBars.txt) has been removed.
|
|
|
263 |
The manual is available in HTML format as a separate download from
|
|
|
264 |
Sourceforge. The manual is also available for on-line viewing from the
|
|
|
265 |
project home page. Starting with this release, the manual is also
|
|
|
266 |
available in PDF format from the project home page.
|
|
|
267 |
|
|
|
268 |
|
|
|
269 |
Cautions, Important Notes, and Compatibility Issues:
|
|
|
270 |
|
|
|
271 |
Due to changes in color allocation (see bug #3049726 below), image files
|
|
|
272 |
produced with PHPlot-5.2.0 will differ when compared byte-for-byte with
|
|
|
273 |
those created by earlier releases, even when the images are identical (as
|
|
|
274 |
they nearly always are).
|
|
|
275 |
|
|
|
276 |
If you are creating a horizontal plot with any negative X values, and not
|
|
|
277 |
setting the Y axis position, your plot will change (see bug #3074402 below)
|
|
|
278 |
because PHPlot no longer leaves the Y axis on the left for horizontal plots.
|
|
|
279 |
|
|
|
280 |
Some internal methods that used to have 'public' visibility are now protected.
|
|
|
281 |
This will generally prevent you from using them. The list of changed functions
|
|
|
282 |
can be found in the release ChangeLog. Avoid using any internal methods.
|
|
|
283 |
|
|
|
284 |
If you are making a stackedbar plot with any negative values, PHPlot-5.1.3
|
|
|
285 |
and earlier took the absolute value of each data value (which was not
|
|
|
286 |
documented), but PHPlot-5.2.0 does not. See Feature Request #3073679 below.
|
|
|
287 |
|
|
|
288 |
If your plot fills the 256 available color map slots in a palette image,
|
|
|
289 |
your image may look different with PHPlot-5.2.0 due to changes in color
|
|
|
290 |
allocation order. This was seen on two of the tests in the PHPlot test
|
|
|
291 |
suite. These tests tiled a JPEG image into the plot area or image
|
|
|
292 |
background. Being a truecolor image, the JPEG had a huge number of colors,
|
|
|
293 |
which filled all available slots in the color map. Additional colors for
|
|
|
294 |
plot elements had to be approximated, and different colors resulted with
|
|
|
295 |
PHPlot-5.2.0 versus previous releases. To avoid this problem, either use a
|
|
|
296 |
truecolor PHPlot object (PHPlot_truecolor constructor), or reduce the
|
|
|
297 |
number of colors in the background image and convert it to PNG or GIF.
|
|
|
298 |
|
|
|
299 |
This release contains significant changes to PHPlot internals. In particular,
|
|
|
300 |
variables and functions related to element colors and color handling have
|
|
|
301 |
changed. Refer to the PHPlot release ChangeLog for more details. Remember,
|
|
|
302 |
if you rely on accessing any member variable, or on using any non-public
|
|
|
303 |
function or any function not documented in the reference section of the manual,
|
|
|
304 |
your code is at risk of breaking with each new release.
|
|
|
305 |
|
|
|
306 |
|
|
|
307 |
New features in 5.2.0:
|
|
|
308 |
|
|
|
309 |
#3077554 "Finer control over plot element colors" (partial):
|
|
|
310 |
The X, Y, and main titles can now have different colors. See the PHPlot
|
|
|
311 |
Reference Manual entries for SetXTitleColor and SetYTitleColor.
|
|
|
312 |
|
|
|
313 |
#3073679 "Stacked bar plots with negative values":
|
|
|
314 |
A stacked bar plot can now include negative values, and stacks of negative
|
|
|
315 |
values will be drawn downwards (or leftwards). See the PHPlot Reference
|
|
|
316 |
Manual under "Plot Type: stackedbars" for details.
|
|
|
317 |
|
|
|
318 |
|
|
|
319 |
Bugs Fixed in 5.2.0:
|
|
|
320 |
|
|
|
321 |
#3045131 "SetTransparentColor problems":
|
|
|
322 |
Setting a transparent color now works whether before or after setting
|
|
|
323 |
the background color (for example), and also now works with a data color.
|
|
|
324 |
|
|
|
325 |
#3049726 "Optimize color allocation"
|
|
|
326 |
PHPlot now defers allocating colors until drawing time, and tries to allocate
|
|
|
327 |
only the colors which are actually needed. For palette images, this results
|
|
|
328 |
in use of fewer color slots and slightly smaller image files.
|
|
|
329 |
|
|
|
330 |
#3074402 "Fix Y axis default for horizontal plots":
|
|
|
331 |
When horizontal plots were introduced, an asymmetry with the X and Y axis
|
|
|
332 |
position defaults was known but left. This behavior was later determined
|
|
|
333 |
to be unhelpful. So now the Y axis on horizontal plots will default to X=0,
|
|
|
334 |
or the X value closest to zero within the plot area range. This is the same
|
|
|
335 |
behavior as for the X axis in vertical plots.
|
|
|
336 |
|
|
|
337 |
#3056991 "Internal methods should be 'protected'":
|
|
|
338 |
More of the internal PHPlot functions were changed to 'protected' visibility,
|
|
|
339 |
as the test suite was fixed to not call them directly.
|
|
|
340 |
|
|
|
341 |
#3057000 "Review 'deprecated' methods":
|
|
|
342 |
One broken deprecated method (SetColor) was removed and one changed.
|
|
|
343 |
Note that deprecated methods are not documented and not tested.
|
|
|
344 |
|
|
|
345 |
-----------------------------------------------------------------------------
|
|
|
346 |
|
|
|
347 |
2010-08-30 Release 5.1.3
|
|
|
348 |
|
|
|
349 |
Overview:
|
|
|
350 |
|
|
|
351 |
This is the current stable release of PHPlot. Additional horizontal plot
|
|
|
352 |
types and features have been added, however horizontal plots are still
|
|
|
353 |
considered 'experimental'. A new callback has been added which allows
|
|
|
354 |
greater control over the data colors. An improved method for accessing
|
|
|
355 |
TrueType Font (TTF) files means that on many systems TTF text can be used
|
|
|
356 |
without specifying font paths.
|
|
|
357 |
|
|
|
358 |
|
|
|
359 |
Cautions and Important Notes:
|
|
|
360 |
|
|
|
361 |
Since the previous PHPlot release, PHP-5.3.3 and PHP-5.2.14 have been
|
|
|
362 |
released, and these include a fix for the TrueType Font (TTF) rendering
|
|
|
363 |
problem. Use of these releases is now recommended.
|
|
|
364 |
|
|
|
365 |
There has been extensive cleanup of the PHPlot code. If you have a
|
|
|
366 |
customized version of PHPlot, you may find it difficult to update.
|
|
|
367 |
|
|
|
368 |
The "additional data support" script phplot_data.php has been removed from
|
|
|
369 |
this release. The script has not been developed or tested in a long time,
|
|
|
370 |
and was found to have numerous problems. The script can still be found in
|
|
|
371 |
the CVS repository.
|
|
|
372 |
|
|
|
373 |
The changes in this release (horizontal plots, custom data color callback,
|
|
|
374 |
and TrueType Font handling) should not result in any compatibility issues.
|
|
|
375 |
|
|
|
376 |
|
|
|
377 |
New features in 5.1.3:
|
|
|
378 |
|
|
|
379 |
#3049703 "Additional horizontal plots and features":
|
|
|
380 |
+ Implemented data values labels in horizontal bar charts.
|
|
|
381 |
Use: SetXDataLabelPos('plotin').
|
|
|
382 |
+ Add horizontal stacked bar charts, with data value labels.
|
|
|
383 |
+ Add horizontal thinbarline plots.
|
|
|
384 |
Horizontal plots are still considered 'experimental', and documentation is
|
|
|
385 |
in the HorizontalBars.txt text file rather than the PHPlot Reference Manual.
|
|
|
386 |
|
|
|
387 |
#3034164 "Extended control of data colors":
|
|
|
388 |
New callback 'data_color' can be used to customize selection of the color
|
|
|
389 |
of each bar, line segment, point marker, etc. This is documented in the
|
|
|
390 |
PHPlot Reference Manual section "Custom Data Color Selection", with new
|
|
|
391 |
examples in the Examples chapter.
|
|
|
392 |
|
|
|
393 |
|
|
|
394 |
Bugs Fixed in 5.1.3:
|
|
|
395 |
|
|
|
396 |
#3051906 "Better choice for default TT font":
|
|
|
397 |
Rather than always using the unlikely 'benjamingothic.ttf' as its default
|
|
|
398 |
TrueType font name, PHPlot now has a short list of sans-serif fonts, and
|
|
|
399 |
tries to find one that works if a default TT font is needed. On many
|
|
|
400 |
systems, this will provide a high-quality default font without help.
|
|
|
401 |
|
|
|
402 |
#3051832 "Let PHP/GD find the font file":
|
|
|
403 |
Instead of using file existence to validate a TT font file, PHPlot now
|
|
|
404 |
just tries to use the font. This allows PHP/GD to use its own rules to
|
|
|
405 |
try to find the font, without needing a pathname. This works on Windows
|
|
|
406 |
and at least some Linux systems.
|
|
|
407 |
|
|
|
408 |
#3048267 "phplot_data add-on is still broken"
|
|
|
409 |
Not fixed. phplot_data.php has been removed from the release.
|
|
|
410 |
|
|
|
411 |
-----------------------------------------------------------------------------
|
|
|
412 |
|
|
|
413 |
2010-06-29 Release 5.1.2
|
|
|
414 |
|
|
|
415 |
Overview:
|
|
|
416 |
|
|
|
417 |
This is the current stable release of PHPlot. Truecolor image support is no
|
|
|
418 |
longer considered 'experimental', and is now documented in the reference
|
|
|
419 |
manual. There is a new experimental feature for horizontal bar charts. This
|
|
|
420 |
release also contains a bug fix and new feature.
|
|
|
421 |
|
|
|
422 |
|
|
|
423 |
Cautions and Important Notes:
|
|
|
424 |
|
|
|
425 |
The advisory against using PHP-5.3.2 or PHP-5.2.13 with PHPlot if you use
|
|
|
426 |
TrueType fonts (TTF) continues. See the item below for PHPlot-5.1.1. The
|
|
|
427 |
good news is that this has been fixed by the PHP Team and will be in the
|
|
|
428 |
next releases.
|
|
|
429 |
|
|
|
430 |
Compatibility of data type and plot type are now checked completely. If
|
|
|
431 |
you used an incorrect data type with certain plot types, your script may no
|
|
|
432 |
longer work until you fix the data type. Specifically, the area, squared,
|
|
|
433 |
and thinbarline plot types failed to check the data type they received, and
|
|
|
434 |
treated anything other than 'data-data' as 'text-data'. If you have a
|
|
|
435 |
squared plot with data type 'data-data-error', for example (which is not
|
|
|
436 |
supposed to work), it did produce a plot, but will now result in an error.
|
|
|
437 |
|
|
|
438 |
The addition of horizontal bar charts should not impact any existing plot,
|
|
|
439 |
with one small exception. The function SetYDataLabelPos() used to accept
|
|
|
440 |
some additional, undocumented options (plotleft, plotright, both, yaxis)
|
|
|
441 |
and pass these through to SetYTickLabelPos() "for compatibility". It no
|
|
|
442 |
longer does so, as some of those are now used for horizontal bar chart
|
|
|
443 |
labels. To position Y tick labels, use only SetYTickLabelPos().
|
|
|
444 |
|
|
|
445 |
|
|
|
446 |
New features in 5.1.2:
|
|
|
447 |
|
|
|
448 |
#3002606 "Add to plot and image border options":
|
|
|
449 |
SetPlotBorderType() now accepts 'right', 'top', and 'bottom', as well
|
|
|
450 |
as an array of options. So you can now control exactly which of the 4
|
|
|
451 |
border sides will be drawn.
|
|
|
452 |
SetImageBorderType() now accepts 'solid' as a choice. This will use the
|
|
|
453 |
actual color set with SetImageBorderColor(), rather than the darker
|
|
|
454 |
shade as type 'plain' does (which may have been a bug).
|
|
|
455 |
SetImageBorderWidth() is a new function that sets the width of the image
|
|
|
456 |
border. The defaults are the same as the fixed values used before: 1
|
|
|
457 |
pixel for plain, 2 pixels for raised. The image border width is now
|
|
|
458 |
accounted for in margin calculations, if it is greater than 2 (to make
|
|
|
459 |
sure existing plots will not change).
|
|
|
460 |
|
|
|
461 |
#2885930 "Horizontal Bars":
|
|
|
462 |
Horizontal bar charts are implemented, as an experimental feature.
|
|
|
463 |
'Experimental' means they are not yet documented in the reference manual,
|
|
|
464 |
and subject to change or removal.
|
|
|
465 |
Refer to the text file HorizontalBars.txt for details.
|
|
|
466 |
|
|
|
467 |
#2947679 (follow-up) "Support for alpha blending/Truecolor":
|
|
|
468 |
Truecolor support is now documented in the Reference Manual. The interim
|
|
|
469 |
documentation file Truecolor.txt has been removed. Alpha channel
|
|
|
470 |
specification now works with both constructors and both image types. This
|
|
|
471 |
fixes an issue if the base constructor was used with a truecolor background
|
|
|
472 |
image. (In PHPlot-5.1.1, the result would be a truecolor image, but the
|
|
|
473 |
alpha channel features were not available.)
|
|
|
474 |
|
|
|
475 |
|
|
|
476 |
Bug Fixed in 5.1.2:
|
|
|
477 |
|
|
|
478 |
#3010116 "Bad rendering of title in multi-plot image when using TTF":
|
|
|
479 |
Make sure the main title is drawn only once, to avoid bad rendering of
|
|
|
480 |
TTF titles with multiple plots due to anti-aliasing.
|
|
|
481 |
|
|
|
482 |
-----------------------------------------------------------------------------
|
|
|
483 |
|
|
|
484 |
2010-04-04 Release 5.1.1
|
|
|
485 |
|
|
|
486 |
Overview:
|
|
|
487 |
|
|
|
488 |
This is the current stable release of PHPlot. This release adds truecolor
|
|
|
489 |
image support as an experimental feature, fixes a number of bugs and adds
|
|
|
490 |
a few new features.
|
|
|
491 |
|
|
|
492 |
The PHPlot reference manual has been updated to match this release. The
|
|
|
493 |
manual is available as a separate download from Sourceforge. The manual is
|
|
|
494 |
also available for on-line viewing from the project home page.
|
|
|
495 |
|
|
|
496 |
See the ChangeLog file in the release for more about changes and bug fixes.
|
|
|
497 |
|
|
|
498 |
|
|
|
499 |
Cautions and Important Notes:
|
|
|
500 |
|
|
|
501 |
Avoid using PHP-5.3.2 or PHP-5.2.13 with PHPlot if you use TrueType fonts
|
|
|
502 |
(TTF). Some new bugs were introduced in those releases that adversely
|
|
|
503 |
affects accurate positioning and rendering of TrueType font text.
|
|
|
504 |
|
|
|
505 |
|
|
|
506 |
New features in 5.1.1:
|
|
|
507 |
|
|
|
508 |
#2947679 "Support for alpha blending/Truecolor":
|
|
|
509 |
PHPlot can now produce truecolor images, with alpha blending of colors and
|
|
|
510 |
other effects. This is considered an experimental feature, meaning it is
|
|
|
511 |
not yet documented in the PHPlot Reference Manual, and subject to change.
|
|
|
512 |
Refer to the text file Truecolor.txt included in the PHPlot release for
|
|
|
513 |
information on using truecolor.
|
|
|
514 |
Two drawing changes were made to improve plot appearance with Truecolor:
|
|
|
515 |
+ Filled dots (in points & linepoints plots) are now drawn better. This
|
|
|
516 |
also makes them look rounder with regular (non-Truecolor) plots.
|
|
|
517 |
+ Area plots have the areas filled without overlapping each area down to
|
|
|
518 |
the Y axis. This was needed to fix problems with alpha blending, and
|
|
|
519 |
should have no effect on non-Truecolor plots.
|
|
|
520 |
|
|
|
521 |
#2973995 "Add y-Data to Stackedbars":
|
|
|
522 |
You can now have Y Data Labels with 'stackedbars' plots. These label the Y
|
|
|
523 |
values (incremental and total) for each bar. Refer to the reference manual
|
|
|
524 |
page for SetYDataLabelPos().
|
|
|
525 |
|
|
|
526 |
|
|
|
527 |
Bug Fixes in 5.1.1:
|
|
|
528 |
|
|
|
529 |
#2976735 "Improvements and fixes for 'area' plots":
|
|
|
530 |
Moving X axis works; handle Y<0 better; new 'stackedarea' plot type is a
|
|
|
531 |
variation on 'area' with the data represented differently.
|
|
|
532 |
|
|
|
533 |
#2974639 "Stacked bars plot breaks with X axis != 0":
|
|
|
534 |
Moving X axis works.
|
|
|
535 |
|
|
|
536 |
#2963757 "point_counts undefined error in 5.1.0":
|
|
|
537 |
Fixed an error introduced in PHPlot-5.1.0 when point size and shape arrays
|
|
|
538 |
were set to the same size.
|
|
|
539 |
|
|
|
540 |
#2938219 "Bars go in wrong direction":
|
|
|
541 |
For bar charts with all Y<0, bars will still be drawn down even if Y=0 is
|
|
|
542 |
not in range.
|
|
|
543 |
|
|
|
544 |
-----------------------------------------------------------------------------
|
|
|
545 |
|
|
|
546 |
2009-12-24 Release 5.1.0
|
|
|
547 |
|
|
|
548 |
Overview:
|
|
|
549 |
|
|
|
550 |
This is the current stable release of PHPlot. This release fixes a number of
|
|
|
551 |
bugs and adds some new features. Some of the changes in this release can
|
|
|
552 |
alter the appearance of plots, so be sure to review the information in this
|
|
|
553 |
NEWS file and test this release with your application.
|
|
|
554 |
|
|
|
555 |
The PHPlot reference manual has been updated to match this release. The
|
|
|
556 |
manual is available as a separate download from Sourceforge. The manual is
|
|
|
557 |
also available for on-line viewing from the project home page.
|
|
|
558 |
|
|
|
559 |
See the ChangeLog file in the release for more about changes and bug fixes.
|
|
|
560 |
|
|
|
561 |
|
|
|
562 |
New features in 5.1.0:
|
|
|
563 |
|
|
|
564 |
+ A new "contrib" directory has been added for useful add-ons.
|
|
|
565 |
This currently contains:
|
|
|
566 |
* prune_labels : Control data label density on X axis.
|
|
|
567 |
* color_range : Define a gradient map for data colors.
|
|
|
568 |
|
|
|
569 |
+ Feature Request 2899921 "Allow different format for data and tick labels"
|
|
|
570 |
Text angle and format can now be controlled separately for data labels.
|
|
|
571 |
|
|
|
572 |
+ Locale loading override
|
|
|
573 |
New variable locale_override stops PHPlot from getting locale from system.
|
|
|
574 |
|
|
|
575 |
+ Translating Coordinates
|
|
|
576 |
New function GetDeviceXY() to translate world to device coordinates.
|
|
|
577 |
|
|
|
578 |
+ New drawing callback
|
|
|
579 |
New callback 'draw_all', called after all drawing is done.
|
|
|
580 |
The manual now contains an example of using this new callback and
|
|
|
581 |
the new GetDeviceXY() function to annotate a plot.
|
|
|
582 |
|
|
|
583 |
|
|
|
584 |
Bug Fixes in 5.1.0:
|
|
|
585 |
|
|
|
586 |
#2914403 "Pie + X/Y titles: Undefined property error"
|
|
|
587 |
X/Y titles are now properly ignored for pie charts.
|
|
|
588 |
|
|
|
589 |
#2908256 "Error: array_sum() should be an array" (drupal)
|
|
|
590 |
#2916864 "Should at least print legend on pie charts with empty data"
|
|
|
591 |
Pie charts with invalid data (no Y values > 0) now make an empty plot.
|
|
|
592 |
|
|
|
593 |
#2906436 "Fixes for X Tick Labels vs X Data Labels"
|
|
|
594 |
Smarter determination of whether to do Tick labels, Data labels, or both.
|
|
|
595 |
|
|
|
596 |
#2900914 "Problem with display of 0 on Y axis"
|
|
|
597 |
Fixed rounding error that could produce something like Y=8.12345E-16.
|
|
|
598 |
|
|
|
599 |
#2886365 "PHP 5 patch" (Declare all functions and variables in PHP5 style)
|
|
|
600 |
Most internal PHPlot member functions now have "protected" visibility.
|
|
|
601 |
|
|
|
602 |
#2839547 "SetImageBorderType('none')
|
|
|
603 |
You can use SetImageBorderType('none') to turn the image border back off.
|
|
|
604 |
|
|
|
605 |
#1795972 "Fix default point shapes"
|
|
|
606 |
We now have 20 (vs 10) point shapes, with 10 (vs 1) used by default.
|
|
|
607 |
|
|
|
608 |
#1795971 "Fix default data colors"
|
|
|
609 |
We now have 16 (vs 8) default data colors, no duplicates, all visible.
|
|
|
610 |
|
|
|
611 |
|
|
|
612 |
Visible Changes and Possible Incompatibilities:
|
|
|
613 |
|
|
|
614 |
+ PHP5 visibility changes (Bug #2886365)
|
|
|
615 |
Details: Most internal PHPlot member functions now have visibility
|
|
|
616 |
'protected', rather than all being public. All member variables are
|
|
|
617 |
still 'public'.
|
|
|
618 |
|
|
|
619 |
Reason for the change: Use the recommended PHP5 syntax, better OO style.
|
|
|
620 |
|
|
|
621 |
Compatibility: If you were calling a PHPlot internal function that got
|
|
|
622 |
changed to 'protected', this will break. Please report this.
|
|
|
623 |
|
|
|
624 |
|
|
|
625 |
+ Fix default point shapes (Bug 1795972)
|
|
|
626 |
Details: We now have 20 (vs 10) point shapes available, and by default we
|
|
|
627 |
have 10 (vs 1) different shapes in use. The default size is now 6 pixels
|
|
|
628 |
for all point shapes.
|
|
|
629 |
|
|
|
630 |
Reason for the changes: Using different shapes helps distinguish the data
|
|
|
631 |
sets. The existing 10 defined shapes were not enough, since some of them
|
|
|
632 |
are not centered over the points, too small, or otherwise hard to see.
|
|
|
633 |
The code to synchronize the point shape and size arrays was broken, and
|
|
|
634 |
some dubious code to adjust sizes to even numbers needed to be fixed.
|
|
|
635 |
|
|
|
636 |
Compatibility (1): If you have a points or linepoints plot with more than
|
|
|
637 |
one dataset, and you did not use SetPointShapes() to configure the
|
|
|
638 |
shapes, them your plot will change from using a diamond for all data
|
|
|
639 |
sets to using different shapes for up to 10 data sets.
|
|
|
640 |
|
|
|
641 |
Compatibility (2): Fixing the point size/point shape array size bug may
|
|
|
642 |
slightly change the size of some shapes, but it now works the way it
|
|
|
643 |
was documented and supposed to work.
|
|
|
644 |
|
|
|
645 |
+ Fix default data colors (Bug 1795971)
|
|
|
646 |
Details: Defined a new set of 16 default data colors. The colors are
|
|
|
647 |
different and contrast well against the default white background.
|
|
|
648 |
The first 4 colors were not changed.
|
|
|
649 |
|
|
|
650 |
Reason for the change: The default 8 data colors included two instances
|
|
|
651 |
of orange, and one color which was invisible on a white background.
|
|
|
652 |
|
|
|
653 |
Compatibility: Colors will change on any plot with more than 4 data sets
|
|
|
654 |
where you did not use SetDataColors() to set your own data colors.
|
|
|
655 |
|
|
|
656 |
+ Re-used old function SetXDataLabelAngle()
|
|
|
657 |
Details: SetXDataLabelAngle() now does something different.
|
|
|
658 |
|
|
|
659 |
Reason for the change: This name was needed for a new function, to set the
|
|
|
660 |
angle for the X Data Labels. The old use of this function was not
|
|
|
661 |
documented, and marked "deprecated" in the code since around 2003-12-07.
|
|
|
662 |
|
|
|
663 |
Compatibility: If you are still using SetXDataLabelAngle() to set both Tick
|
|
|
664 |
and Data label angles, you need to use SetXLabelAngle() instead.
|
|
|
665 |
|
|
|
666 |
+ Separate controls for tick and data labels (Feature Request 2899921)
|
|
|
667 |
Details: New functions SetXDataLabelAngle(), SetYDataLabelAngle(),
|
|
|
668 |
SetXDataLabelType(), and SetYDataLabelType() to allow separate control
|
|
|
669 |
over the angle and format of data labels, versus tick labels.
|
|
|
670 |
|
|
|
671 |
Reason for the change: Allow Data Labels to use different formatting and
|
|
|
672 |
angle compared to Tick Labels.
|
|
|
673 |
|
|
|
674 |
Compatibility: The default behavior has been set up such that there should
|
|
|
675 |
be no compatibility issues. For example:
|
|
|
676 |
Old behavior: SetXLabelType() sets the type for both tick and data labels.
|
|
|
677 |
New behavior: SetXLabelType() sets the type for tick labels and the
|
|
|
678 |
default type for data labels. SetXDataLabelType() sets the type for
|
|
|
679 |
data labels (overrides SetXLabelType).
|
|
|
680 |
|
|
|
681 |
+ X Tick Labels vs X Data Labels (Bug 2906436)
|
|
|
682 |
Details: Regarding SetXTickLabelPos() and SetXDataLabelPos(): If only one
|
|
|
683 |
of them is called, the behavior is unchanged (only that label type will
|
|
|
684 |
be displayed). If both are called: Do exactly what was requested. If
|
|
|
685 |
neither was called: display only data labels if any data labels are
|
|
|
686 |
non-empty, else display only tick labels.
|
|
|
687 |
|
|
|
688 |
Reason for the change: 1) Fix the long-standing problem behavior that by
|
|
|
689 |
default PHPlot overlays tick and data labels below the X axis. 2) Fix
|
|
|
690 |
order dependency between setting the position of tick and data labels.
|
|
|
691 |
3) Prepare for future extension of data labels, and allow both tick
|
|
|
692 |
and data labels to be on if the programmer enables both.
|
|
|
693 |
|
|
|
694 |
Compatibility: There are some cases where your plot will change.
|
|
|
695 |
(a) Calls neither SetXDataLabelPos() nor SetXTickLabelPos():
|
|
|
696 |
Old behavior: Both tick and data labels displayed, possibly overlaid.
|
|
|
697 |
New behavior: If there are any non-blank data labels, then show only
|
|
|
698 |
the data labels, not the tick labels. Otherwise, show tick labels.
|
|
|
699 |
|
|
|
700 |
(b) Calls both SetXDataLabelPos() and SetXTickLabelPos(), with other than
|
|
|
701 |
'none' for each position:
|
|
|
702 |
Old behavior: The latter call was effective; earlier one ignored.
|
|
|
703 |
New behavior: Independent of order, both calls are effective.
|
|
|
704 |
|
|
|
705 |
-----------------------------------------------------------------------------
|
|
|
706 |
|
|
|
707 |
2009-06-14 Release 5.0.7
|
|
|
708 |
|
|
|
709 |
Overview:
|
|
|
710 |
|
|
|
711 |
This is the current stable release of PHPlot. The release adds one new
|
|
|
712 |
feature, fixes a few bugs, and changes the license under which PHPlot
|
|
|
713 |
is released.
|
|
|
714 |
|
|
|
715 |
The PHPlot reference manual has been updated to match this release. The
|
|
|
716 |
manual is available as a separate download from Sourceforge. The manual is
|
|
|
717 |
also now available for on-line viewing at http://phplot.sourceforge.net
|
|
|
718 |
|
|
|
719 |
See the ChangeLog file for more about changes and bug fixes.
|
|
|
720 |
|
|
|
721 |
|
|
|
722 |
Licensing:
|
|
|
723 |
|
|
|
724 |
PHPlot is now released on the terms of the GNU Lesser General Public
|
|
|
725 |
License, version 2.1. (Previous versions of PHPlot were released under
|
|
|
726 |
a dual "PHP/GPL" license.) The licensing change was authorized by the
|
|
|
727 |
original author and copyright holder of PHPlot.
|
|
|
728 |
|
|
|
729 |
|
|
|
730 |
New feature in 5.0.7:
|
|
|
731 |
|
|
|
732 |
+ Plot area margins can now be partially specified, using either
|
|
|
733 |
SetMarginsPixels or SetPlotAreaPixels. In previous releases of
|
|
|
734 |
PHPlot you had to either specify all 4 margins or none.
|
|
|
735 |
Credit to adoll for this feature.
|
|
|
736 |
|
|
|
737 |
|
|
|
738 |
Visible Changes and Possible Incompatibilities:
|
|
|
739 |
|
|
|
740 |
+ Y data range can change:
|
|
|
741 |
As a result of the bug fixes in this release, automatically-calculated
|
|
|
742 |
Y data ranges can change. If you have missing Y values in your data,
|
|
|
743 |
and you let PHPlot calculate the Y data range (that is, you do not
|
|
|
744 |
call SetPlotAreaWorld with a Ymin value), then the lower limit for Y
|
|
|
745 |
can change. If you have a plot with data-data-error data type, different
|
|
|
746 |
error values for different points, and let PHPlot calculate the Y data
|
|
|
747 |
range, then either Y limit can change.
|
|
|
748 |
|
|
|
749 |
|
|
|
750 |
Bug Fixes in 5.0.7:
|
|
|
751 |
|
|
|
752 |
|
|
|
753 |
+ Fix for bug 2803900: SetRGBArray('large') does not work:
|
|
|
754 |
Corrected an array name usage problem. You can now select the large
|
|
|
755 |
color map. Also PHPlot no longer overrides use of the PHP include
|
|
|
756 |
path when loading the large color map, and now reports an error if the
|
|
|
757 |
file is needed and not found.
|
|
|
758 |
|
|
|
759 |
+ Fix for bug 2791502 "Error plots treat missing Y values as 0":
|
|
|
760 |
Missing Y values now with with data-data-error plots.
|
|
|
761 |
|
|
|
762 |
+ Fix for bug 2792860 "Wrong DataLabelLines with missing Y":
|
|
|
763 |
Data label lines are now suppressed at missing Y values.
|
|
|
764 |
|
|
|
765 |
+ Fix for bug 2786350 "Missing Y data results in bad auto-range":
|
|
|
766 |
Missing Y values are now ignored when calculating the Y data range.
|
|
|
767 |
Bug report and analysis by mrten.
|
|
|
768 |
|
|
|
769 |
+ Fix for bug 2786354 "Incorrect auto-range for data-data-error":
|
|
|
770 |
The Y data range is now correctly calculated for data-data-error plots
|
|
|
771 |
when the error values differ from point to point.
|
|
|
772 |
|
|
|
773 |
|
|
|
774 |
-----------------------------------------------------------------------------
|
|
|
775 |
|
|
|
776 |
2009-01-20 Release 5.0.6
|
|
|
777 |
|
|
|
778 |
Overview:
|
|
|
779 |
|
|
|
780 |
This is the current stable release of PHPlot. The purpose of this release
|
|
|
781 |
is to fix additional problems with text spacing and positioning, and
|
|
|
782 |
introduce some minor new features.
|
|
|
783 |
|
|
|
784 |
The PHPlot reference manual has been updated to match this release. The
|
|
|
785 |
manual is available as a separate download from Sourceforge. The manual is
|
|
|
786 |
also now available for on-line viewing at http://phplot.sourceforge.net
|
|
|
787 |
|
|
|
788 |
|
|
|
789 |
New features in 5.0.6:
|
|
|
790 |
|
|
|
791 |
+ Allow mixing GD and TrueType font text on the same plot
|
|
|
792 |
You can use the new method functions SetFontGD() and SetFontTTF() to
|
|
|
793 |
select a font and font type for text element (labels, titles, etc.) For
|
|
|
794 |
example, you can have TrueType plot titles, and GD-fixed font labels.
|
|
|
795 |
SetUseTTF() now sets the default text type, TTF or GD. This is fully
|
|
|
796 |
backward compatible.
|
|
|
797 |
|
|
|
798 |
+ Extended label formatting
|
|
|
799 |
See the reference manual for more information on these.
|
|
|
800 |
|
|
|
801 |
New label formatting types are added: 'printf' (using a user-defined
|
|
|
802 |
format), and 'custom' (using a callback function).
|
|
|
803 |
|
|
|
804 |
For 'data' type formatting, a prefix and suffix can be added. (PHPlot
|
|
|
805 |
previously had an undocumented suffix for 'data' type, which still
|
|
|
806 |
works.)
|
|
|
807 |
|
|
|
808 |
For 'time' formatting, the format can now be specified in the same function
|
|
|
809 |
call rather than using SetXTimeFormat and SetYTimeFormat.
|
|
|
810 |
|
|
|
811 |
For 'data' formatting, the precision can now be specified in the same
|
|
|
812 |
function call, rather than using SetPrecisionX and SetPrecisionY.
|
|
|
813 |
|
|
|
814 |
+ Better control over line spacing in multi-line labels
|
|
|
815 |
|
|
|
816 |
Line spacing can now be set separately for each text element using an
|
|
|
817 |
additional argument to SetFont, SetFontGD, and SetFontTTF. The overall
|
|
|
818 |
SetLineSpacing() value is the default for each text element that does not
|
|
|
819 |
have a specific line spacing set.
|
|
|
820 |
|
|
|
821 |
PHPlot now interprets the value set for line spacing as the number of
|
|
|
822 |
pixels only for GD text. For TrueType text, it is a scale factor for the
|
|
|
823 |
font's built-in line spacing for TrueType text. The equation used is:
|
|
|
824 |
interline_spacing = line_spacing * font_natural_spacing / 6
|
|
|
825 |
where line_spacing is either the global value set with SetLineSpacing
|
|
|
826 |
or a more specific value set with SetFont(), and font_natural_spacing
|
|
|
827 |
is the amount of space between lines built-in to the TrueType font. The
|
|
|
828 |
factor 6 should really be 4 (since PHPlot always used 4 as the default
|
|
|
829 |
line_spacing, this would give the natural font spacing by default). But
|
|
|
830 |
the text is too widely spaced with this value, and 6 was chosen to be
|
|
|
831 |
more compatible for typical font sizes.
|
|
|
832 |
|
|
|
833 |
Visible Changes and Possible Incompatibilities:
|
|
|
834 |
|
|
|
835 |
+ Line spacing
|
|
|
836 |
Multi-line TrueType titles and labels will have different inter-line
|
|
|
837 |
spacing. Since the text size affects the margin and plot area sizes,
|
|
|
838 |
this results in slightly different sized features on any plot with
|
|
|
839 |
multi-line TrueType text.
|
|
|
840 |
Previous versions of PHPlot used a default 4 pixels for inter-line
|
|
|
841 |
spacing of multi-line TrueType text, regardless of the font size.
|
|
|
842 |
PHPlot now uses the 'natural' font inter-line spacing, adjusted by a line
|
|
|
843 |
spacing parameter (per text type, with a global default).
|
|
|
844 |
|
|
|
845 |
The same change can also increase the size of the legend box slightly.
|
|
|
846 |
|
|
|
847 |
+ Internal changes were made to the way font information is stored. Anything
|
|
|
848 |
that directly references PHPlot internals regarding fonts will break. Usage
|
|
|
849 |
also changed for the internal functions to size and draw text (ProcessText*,
|
|
|
850 |
SizeText*) due to font data storage changes.
|
|
|
851 |
|
|
|
852 |
+ Changes were made to internal class variables used to store label
|
|
|
853 |
formatting information. Anything relying on these internals may break.
|
|
|
854 |
|
|
|
855 |
|
|
|
856 |
Bug Fixes in 5.0.6:
|
|
|
857 |
|
|
|
858 |
#1932571: Data-Data Plot fails with same X values
|
|
|
859 |
PHPlot will no longer hang if all X values are the same. But this is
|
|
|
860 |
interim fix to force the X range to 1 to prevent the hang. Eventually,
|
|
|
861 |
smarter automatic range code will handle this better.
|
|
|
862 |
Credit to andyl for finding this.
|
|
|
863 |
|
|
|
864 |
#1891636: Misaligned TTF X Labels
|
|
|
865 |
PHPlot will now correctly line-up TrueType labels along the X axis. There
|
|
|
866 |
were small but very noticeable errors before, when the text had descenders
|
|
|
867 |
or lines with all short letters.
|
|
|
868 |
|
|
|
869 |
|
|
|
870 |
-----------------------------------------------------------------------------
|
|
|
871 |
|
|
|
872 |
2008-01-13 Released 5.0.5
|
|
|
873 |
|
|
|
874 |
Overview:
|
|
|
875 |
|
|
|
876 |
This is the current stable release of PHPlot. The emphasis of this release
|
|
|
877 |
is to improve text positioning, margin calculation, and error handling.
|
|
|
878 |
|
|
|
879 |
Although this is considered a stable release, it has a large amount
|
|
|
880 |
of changed code compared to the previous release 5.0.4. Two of the more
|
|
|
881 |
complex components of PHPlot - text and margin calculations - were mostly
|
|
|
882 |
re-written in this release. You are advised to carefully test your own
|
|
|
883 |
applications with PHPlot-5.0.5 to see how your plots look. Refer to the
|
|
|
884 |
README.txt file included in the release for information on reporting problems.
|
|
|
885 |
|
|
|
886 |
Starting with this release, PHPlot no longer supports PHP4, since the PHP
|
|
|
887 |
group officially declared end-of-life for PHP4 as of 31 December 2007.
|
|
|
888 |
PHPlot-5.0.5 was tested only with PHP-5.2.5 and we are unlikely to address
|
|
|
889 |
any issues using PHPlot with older versions of PHP.
|
|
|
890 |
|
|
|
891 |
The PHPlot reference manual has been updated to match this release. The
|
|
|
892 |
manual is available as a separate download from Sourceforge. The manual is
|
|
|
893 |
now also now available for on-line viewing at http://phplot.sourceforge.net
|
|
|
894 |
|
|
|
895 |
The callback feature added in 5.0.4 is now documented in the reference
|
|
|
896 |
manual. It is still considered experimental and subject to change, however.
|
|
|
897 |
|
|
|
898 |
|
|
|
899 |
|
|
|
900 |
Visible Changes and Possible Incompatibilities:
|
|
|
901 |
|
|
|
902 |
+ Dropped support for PHP4.
|
|
|
903 |
|
|
|
904 |
+ Eliminated remaining order-dependent behavior related to margins and
|
|
|
905 |
text. PHPlot should now do nothing at all, except record parameters, until
|
|
|
906 |
you draw the graph with DrawGraph. I believe this was always the intended
|
|
|
907 |
behavior of PHPlot, but over time perhaps various pre-calculations and
|
|
|
908 |
dependencies crept in. Fixing this simplifies processing and should lead to
|
|
|
909 |
more consistent behavior.
|
|
|
910 |
|
|
|
911 |
+ The rewritten margin calculation code now uses actual sizes of all tick
|
|
|
912 |
and data labels and tick marks, rather than guesses. Margins collapse to
|
|
|
913 |
remove unused elements, but a minimum margin (currently fixed at 15 pixels)
|
|
|
914 |
is applied so the plot edges don't get to close to the image edges. The
|
|
|
915 |
result is that most graphs with auto-calculated margins will change in
|
|
|
916 |
appearance. It most cases, the margins get slightly smaller. In other
|
|
|
917 |
cases, earlier releases mis-calculated the margins, so this release will
|
|
|
918 |
produce much neater margins.
|
|
|
919 |
|
|
|
920 |
+ The X and Y titles are now offset out from the plot area, not in from the
|
|
|
921 |
image area. For auto-calculated margins this should not make any
|
|
|
922 |
difference, but if you use SetMarginsPixels or SetPlotAreaPixels to set
|
|
|
923 |
larger margins, the axis titles will move in closer to the plot with this
|
|
|
924 |
release.
|
|
|
925 |
|
|
|
926 |
+ Changes were made to PHPlot internals, including removal of some class
|
|
|
927 |
variables and functions, and addition of new variables and functions.
|
|
|
928 |
These are documented in the ChangeLog. Relying on any internal variables
|
|
|
929 |
or functions in an application using PHPlot is unwise. The following
|
|
|
930 |
internal functions were removed:
|
|
|
931 |
SetImageArea() DrawDotSeries() DrawLineSeries() CalcXHeights()
|
|
|
932 |
CalcYWidths() DrawLabels() InitImage() DrawDashedLine()
|
|
|
933 |
These were marked 'deprecated', were undocumented and unmaintained.
|
|
|
934 |
TTFBBoxSize()
|
|
|
935 |
This was replaced with SizeText().
|
|
|
936 |
|
|
|
937 |
+ Line spacing set with SetLineSpacing() now affects TTF text as well as
|
|
|
938 |
GD text. Previously, it only affected GD text. The default line spacing
|
|
|
939 |
happens to be usable for TTF text.
|
|
|
940 |
|
|
|
941 |
+ Changes were made to error handling. PHPlot will now trigger a user-level
|
|
|
942 |
error after producing an error image, instead of exiting. If no error
|
|
|
943 |
handler has been set, it will exit, as before. But now the error message
|
|
|
944 |
should also get logged, or written to the standard error stream, depending
|
|
|
945 |
on the SAPI in use. You can now establish an error handler to catch most
|
|
|
946 |
PHPlot errors and do some cleanup before exit.
|
|
|
947 |
|
|
|
948 |
+ PHPlot no longer accepts some invalid option values (such as a substring
|
|
|
949 |
of a valid value, or empty strings) passed to functions. If your
|
|
|
950 |
application aborts in CheckOption with PHPlot-5.0.5 but 'worked' with
|
|
|
951 |
previous releases, them you were probably using an invalid option value.
|
|
|
952 |
|
|
|
953 |
|
|
|
954 |
|
|
|
955 |
Bug Fixes in 5.0.5:
|
|
|
956 |
|
|
|
957 |
#945439: x_tick_label_height not set correctly
|
|
|
958 |
Exact sizes of labels are now used to calculate margins.
|
|
|
959 |
|
|
|
960 |
#1813070: Bad position for multi-line TrueType text
|
|
|
961 |
Fixed as part of text functions rewrite. Use correct basepoint
|
|
|
962 |
(lower left of each line) when positioning text lines.
|
|
|
963 |
|
|
|
964 |
#1813071: Wrong title height for multi-line TTF text
|
|
|
965 |
Fixed as part of text functions rewrite: calculate height of
|
|
|
966 |
multi-line text correctly. Also now uses the line-spacing setting.
|
|
|
967 |
|
|
|
968 |
#1813474: DrawText alignment arguments wrong
|
|
|
969 |
Fixed so 'top' and 'bottom' now have the usual meaning: top means
|
|
|
970 |
align top of text with reference, bottom means align bottom of text.
|
|
|
971 |
This was switched before. Changed every internal caller to compensate.
|
|
|
972 |
|
|
|
973 |
#1816844: Fix order dependency for setting titles
|
|
|
974 |
Defer processing of title strings until DrawGraph(),
|
|
|
975 |
so it doesn't matter if fonts, etc. are set before or after.
|
|
|
976 |
|
|
|
977 |
#1819668: Horiz. align multi-line text: GD vs TTF
|
|
|
978 |
The text functions were rewritten to draw TTF text line-by-line,
|
|
|
979 |
like GD text, and correctly align each line.
|
|
|
980 |
|
|
|
981 |
#1823774: Default Font Path and Error Message
|
|
|
982 |
Error handling has been improved to make sure a message is logged, in
|
|
|
983 |
addition to the error image, and use error_trigger rather than exit.
|
|
|
984 |
|
|
|
985 |
#1826513: FIXME in DrawLegend: Max label length
|
|
|
986 |
The actual size needed for legend text is now used.
|
|
|
987 |
|
|
|
988 |
#1827263: Spoiled up pie-chart if $val is close to zero
|
|
|
989 |
Fixed by skipping over any segment that rounds to 0 degrees of
|
|
|
990 |
arc. (The GD function uses integer angles only, and 0 degrees
|
|
|
991 |
means draw a complete circle.)
|
|
|
992 |
|
|
|
993 |
#1836528: Insufficient checking of parameter values
|
|
|
994 |
Rewrote validator function to reject improper parameter values.
|
|
|
995 |
|
|
|
996 |
#1843012: Make margins, drawing consistent
|
|
|
997 |
Margin code logic was rewritten and checked for consistency.
|
|
|
998 |
|
|
|
999 |
#1856207: Margin error with 'xaxis'/'yaxis' position
|
|
|
1000 |
Margin space is now allocated for ticks and labels if their position
|
|
|
1001 |
is 'xaxis' or 'yaxis' and the axis is at the plot edge. This is not
|
|
|
1002 |
a perfect fix (the axis could be close but not at the edge).
|
|
|
1003 |
|
|
|
1004 |
|
|
|
1005 |
-----------------------------------------------------------------------------
|
|
|
1006 |
|
|
|
1007 |
2007-10-20 Released 5.0.4
|
|
|
1008 |
|
|
|
1009 |
Overview:
|
|
|
1010 |
|
|
|
1011 |
This is the latest stable release of PHPlot. We are abandoning the 'rc'
|
|
|
1012 |
version naming style, because we don't consider these last releases
|
|
|
1013 |
'release candidate' versions. As we continue to make changes to PHPlot,
|
|
|
1014 |
we are not converging toward a final "5.0" release, however we do consider
|
|
|
1015 |
these releases stable and complete enough for production use.
|
|
|
1016 |
|
|
|
1017 |
This release fixes a number of problems and introduces a few new features.
|
|
|
1018 |
|
|
|
1019 |
The PHPlot reference manual has also been updated to match this release.
|
|
|
1020 |
New material has been added documenting some of the PHPlot internals.
|
|
|
1021 |
The manual is available as a separate download from Sourceforge.
|
|
|
1022 |
|
|
|
1023 |
|
|
|
1024 |
Code Cleanup:
|
|
|
1025 |
|
|
|
1026 |
Some code cleanup is going in to this release. It is hoped that these
|
|
|
1027 |
changes will not impact any existing scripts using PHPlot, but will make
|
|
|
1028 |
the PHPlot code itself easier to understand and maintain.
|
|
|
1029 |
|
|
|
1030 |
PHPlot now avoids making changes outside its own class definition. There
|
|
|
1031 |
are no longer any functions defined outside the class, nor any constants.
|
|
|
1032 |
Three constants (MINY MAXY TOTY) were removed, and 2 functions were removed
|
|
|
1033 |
(see Visible Changes below). Also PHPlot no longer sets the PHP error
|
|
|
1034 |
reporting level to E_ALL. Although we highly recommend setting error
|
|
|
1035 |
reporting to E_ALL in your php.ini file or scripts, it is not right for
|
|
|
1036 |
PHPlot to assume that you want it.
|
|
|
1037 |
|
|
|
1038 |
|
|
|
1039 |
Visible Changes and Possible Incompatibilities:
|
|
|
1040 |
|
|
|
1041 |
Arrays containing color and style information are used with several PHPlot
|
|
|
1042 |
functions to control the plot style array. These functions are:
|
|
|
1043 |
SetPointShapes, SetPointSizes, SetLineWidths, SetLineStyles,
|
|
|
1044 |
SetDataColors, SetDataBorderColors, and SetErrorBarColors.
|
|
|
1045 |
The arrays passed to these functions MUST used sequential integer 0-based
|
|
|
1046 |
indexes. This is what the PHP manual calls "Usual integer indices (starting
|
|
|
1047 |
from zero, increasing by one)". This is the type of array you get in PHP by
|
|
|
1048 |
default if you use array() without specifying key values, or use the
|
|
|
1049 |
empty-bracket assignment operator to add values onto an array. In previous
|
|
|
1050 |
versions of PHPlot, some of these functions would also work with
|
|
|
1051 |
string-indexed or non-sequentially-indexed arrays, but this was not clearly
|
|
|
1052 |
defined. Starting with PHPlot-5.0.4, only arrays with "usual integer
|
|
|
1053 |
indices" work, and other array indexes will cause errors.
|
|
|
1054 |
|
|
|
1055 |
Some internal-use-only functions have had their usage changed or been removed.
|
|
|
1056 |
If you are using functions that are not documented in the PHPlot Function
|
|
|
1057 |
Reference in the manual, your code may have to be changed.
|
|
|
1058 |
|
|
|
1059 |
As part of the code cleanup, two functions which were defined outside the
|
|
|
1060 |
PHPlot class were removed: array_pad_array(), and array_merge_php4().
|
|
|
1061 |
If your code used these, you need to fix your code.
|
|
|
1062 |
|
|
|
1063 |
The routines which accept a color name, value, or array now check for a valid
|
|
|
1064 |
color name. If you specify a color name which is not in your current color
|
|
|
1065 |
table, PHPlot will draw an error and exit. Previously, PHP would report an
|
|
|
1066 |
index error, continue, and get a 'headers already sent' message.
|
|
|
1067 |
|
|
|
1068 |
|
|
|
1069 |
Bug Fixes in 5.0.4:
|
|
|
1070 |
|
|
|
1071 |
#1813021: Miss-positioned right-justified vertical GD text.
|
|
|
1072 |
Fixed DrawText() to correctly position 90 degree right-justified text
|
|
|
1073 |
drawn in a fixed GD font. This could be seen with 90 degree Y tick labels.
|
|
|
1074 |
|
|
|
1075 |
#1790441 Removed destructor/shutdown function, and no longer recommend
|
|
|
1076 |
using reference assignment when creating a PHPlot object. This was
|
|
|
1077 |
interfering with memory usage.
|
|
|
1078 |
Credit to annajilly for analysis.
|
|
|
1079 |
|
|
|
1080 |
#1779115 SetLegendWorld() failed because of undefined variables. The
|
|
|
1081 |
required order dependency was too hard to meet. This is now fixed.
|
|
|
1082 |
You can now use SetLegendWorld anywhere before DrawGraph.
|
|
|
1083 |
|
|
|
1084 |
#1726810 (feature request, but actually a bug fix) Ignore empty strings
|
|
|
1085 |
as data labels when doing time or data label formatting. These would
|
|
|
1086 |
previously produce errors or bad formatting. Now you can omit labels
|
|
|
1087 |
as needed even with time and data formatting.
|
|
|
1088 |
Credit to exgerhardr for finding this.
|
|
|
1089 |
|
|
|
1090 |
#1605555 Y data labels used wrong font and not formatted (bar charts only).
|
|
|
1091 |
|
|
|
1092 |
#1208054 Localization of number formatting in 'data' format type. PHPlot
|
|
|
1093 |
will attempt to format the numbers in a way appropriate to your locale.
|
|
|
1094 |
You can also force the formatting with the new function SetNumberFormat.
|
|
|
1095 |
Credit to David Hernández Sanz.
|
|
|
1096 |
|
|
|
1097 |
#937944 X/Y Tick counts: PHPlot could draw one two few Y tick counts, and
|
|
|
1098 |
one too many X tick counts. This is not a perfect fix, and more work is
|
|
|
1099 |
needed here, but this fixes an error case in both X and Y values.
|
|
|
1100 |
|
|
|
1101 |
|
|
|
1102 |
New Features in 5.0.4:
|
|
|
1103 |
|
|
|
1104 |
New function SetLegendStyle allows control of the alignment of text and
|
|
|
1105 |
color boxes within the legend. Also allows removing the color boxes.
|
|
|
1106 |
Based on bug #1208054.
|
|
|
1107 |
Credit to David Hernández Sanz.
|
|
|
1108 |
|
|
|
1109 |
New function SetNumberFormat. See bug report #1208054 above.
|
|
|
1110 |
|
|
|
1111 |
Callbacks are added. PHPlot can call back your functions while generating the
|
|
|
1112 |
plot. This is experimental, and documented only in the file "Callbacks".
|
|
|
1113 |
Credit to annajilly for the idea and design.
|
|
|
1114 |
|
|
|
1115 |
-----------------------------------------------------------------------------
|
|
|
1116 |
|
|
|
1117 |
2006-11-13 Released 5.0rc3
|
|
|
1118 |
|
|
|
1119 |
Overview:
|
|
|
1120 |
|
|
|
1121 |
This is an interim release. It has been a long time since the previous
|
|
|
1122 |
release 5.0rc2, and there have been a lot of changes. There are still more
|
|
|
1123 |
changes likely to go in before we have "5.0", but there are enough for now.
|
|
|
1124 |
|
|
|
1125 |
The PHPlot Reference Manual has also been released, and is available as a
|
|
|
1126 |
separate download from Sourceforge. PHPlot users and developers are
|
|
|
1127 |
strongly encouraged to read the manual.
|
|
|
1128 |
|
|
|
1129 |
This release does not include the "doc/" and "examples/" directories of
|
|
|
1130 |
previous releases. The Reference Manual contains more complete and
|
|
|
1131 |
up-to-date information and examples, and I am unable to maintain the doc/
|
|
|
1132 |
and examples/ files while also maintaining the Reference Manual. If you
|
|
|
1133 |
need those files, they can be accessed with the Sourceforge web CVS
|
|
|
1134 |
browser.
|
|
|
1135 |
|
|
|
1136 |
|
|
|
1137 |
New Features:
|
|
|
1138 |
|
|
|
1139 |
The emphasis for this release is bug fixing, so there are few new features.
|
|
|
1140 |
|
|
|
1141 |
+ You can now suppress lines or points on individual plots in a linepoints
|
|
|
1142 |
graph. This feature was added because I needed a graph with several
|
|
|
1143 |
linepoints lines, but also with a solid line showing an "80% goal".
|
|
|
1144 |
Use SetPointShapes with the value 'none' in the array to suppress the
|
|
|
1145 |
point markers for that plot (and only draw the line).
|
|
|
1146 |
Use SetLineStyles with the value 'none' in the array to suppress the
|
|
|
1147 |
line for that plot (and only draw the point markers).
|
|
|
1148 |
[Bug # 1594458]
|
|
|
1149 |
|
|
|
1150 |
+ Bar charts can have data labels above the bar with the value. Turn
|
|
|
1151 |
these on with SetYDataLabelPos('plotin'). This is somewhat experimental,
|
|
|
1152 |
since there isn't a lot of room for labels on top of the bars and you
|
|
|
1153 |
may find the results are not useful.
|
|
|
1154 |
|
|
|
1155 |
|
|
|
1156 |
Visible Changes:
|
|
|
1157 |
|
|
|
1158 |
Here are the more significant changes in this release. These are changes
|
|
|
1159 |
which may affect existing scripts and output from PHPlot. See the
|
|
|
1160 |
ChangeLog file for information about all changes and bug fixes.
|
|
|
1161 |
|
|
|
1162 |
+ A bug fix on bar chart bar borders results in black borders around the
|
|
|
1163 |
bars if shading is turned off. The border was previously covered up,
|
|
|
1164 |
but was supposed to be there. If you need borderless, unshaded bars,
|
|
|
1165 |
you need to use SetDataBorderColors to make the borders the same colors
|
|
|
1166 |
as the bars. [Bug # 1096197]
|
|
|
1167 |
|
|
|
1168 |
+ TrueType font pathname handling was fixed. You no longer need to use
|
|
|
1169 |
SetUseTTF(True). You can either use full paths to the font files with
|
|
|
1170 |
SetDefaultTTFont() and SetFont(), or you can call SetTTFPath() to point
|
|
|
1171 |
to a directory of font files, and then use simple font filenames without
|
|
|
1172 |
paths in SetDefaultTTFont() and SetFont().
|
|
|
1173 |
[Bug # 1144644 plus several others]
|
|
|
1174 |
|
|
|
1175 |
+ There have been several fixes regarding automatically calculated ranges
|
|
|
1176 |
and scales. The result is that you may see less extra space and fewer
|
|
|
1177 |
tick marks in some cases.
|
|
|
1178 |
|
|
|
1179 |
+ A fix was made to bar and stackedbar graph bar widths in order to get
|
|
|
1180 |
the X axis labels to properly center. As part of the fix, the bar widths
|
|
|
1181 |
now match between the two graph types. (Before this fix, the bars were
|
|
|
1182 |
narrower in bar graphs compared to the same data plotted as a stacked
|
|
|
1183 |
bar.) As a result, bar graph bars will now be drawn with wider bars, and
|
|
|
1184 |
stackedbar graph bars will be narrower. You can adjust this with the new
|
|
|
1185 |
class variable bar_extra_space. [Bug # 1437912]
|
|
|
1186 |
|
|
|
1187 |
+ Dot shapes and sizes were off by 1 or 2 slots in the array of shapes or
|
|
|
1188 |
sizes. After the fix, you may get different dot shapes or sizes per
|
|
|
1189 |
plot line. [Bug # 1096194]
|
|
|
1190 |
|
|
|
1191 |
|
|
|
1192 |
Testing:
|
|
|
1193 |
|
|
|
1194 |
Since its output is visual (graphics), and it has so many interconnected
|
|
|
1195 |
modes and options, PHPlot is difficult to test. But at least we are now
|
|
|
1196 |
trying. I have a collection of PHPlot scripts (currently about 60) and a
|
|
|
1197 |
script to run through them. The script automatically checks that:
|
|
|
1198 |
1) Nothing was written to the standard error stream;
|
|
|
1199 |
2) An image file of size greater than 0 was written;
|
|
|
1200 |
3) Neither the test script nor PHPlot did exit(). This catches cases
|
|
|
1201 |
where PHPlot aborts with DrawError().
|
|
|
1202 |
|
|
|
1203 |
The automated test is an easy way to check for serious regression, but you
|
|
|
1204 |
really need to inspect the output files to validate PHPlot. This takes a
|
|
|
1205 |
little time, and it is easy to overlook problems.
|
|
|
1206 |
|
|
|
1207 |
The real issue is test coverage. Just as we can be sure that future
|
|
|
1208 |
PHPlot releases will pass the test collection, we can also be sure that
|
|
|
1209 |
future bug reports will be written against untested cases.
|
|
|
1210 |
|
|
|
1211 |
--------------------
|
|
|
1212 |
|
|
|
1213 |
2006-11-08 PHPlot on Sourceforge has a new maintainer: lbayuk
|
|
|
1214 |
|
|
|
1215 |
--------------------
|
|
|
1216 |
|
|
|
1217 |
2004-10-24 Released 5.0rc2
|
|
|
1218 |
|
|
|
1219 |
--------------------
|
|
|
1220 |
|