1 This is the NEWS file for PHPlot, with release documentation.
\r
2 The project web site is http://sourceforge.net/projects/phplot/
\r
3 The project home page is http://phplot.sourceforge.net/
\r
4 Refer the the ChangeLog file for detailed source changes.
\r
5 -----------------------------------------------------------------------------
\r
7 2011-01-15 Release 5.3.1
\r
11 This is the current stable release of PHPlot. This release focuses on
\r
12 providing better support and documentation for creating multiple plots on a
\r
15 The PHPlot reference manual has been updated to match this release. Some
\r
16 new material has been added, including a new section on multiple plots per
\r
17 image, and a new example of overlay plots.
\r
20 Bugs Fixed in 5.3.1:
\r
22 #3143586 "Multiple plots per image - fixes & docs":
\r
23 The reference manual now contains a section on multiple plots, and a
\r
24 new example. A bug was fixed with SetLegendWorld and multiple plots.
\r
25 Image border will now be drawn at most once. It is now possible to
\r
26 restore the default 'automatic' behavior for axis positioning. Other
\r
27 functions were changed to make arguments optional, so when called with
\r
28 no arguments they reset to the default. The reference manual has been
\r
29 updated with these changes too.
\r
31 #3147397 "Data colors missing with multiple plots":
\r
32 The fix for bug #3049726 "Optimize color allocation" caused a problem
\r
33 with multiple plots. This has been fixed. PHPlot will no longer truncate
\r
34 the data color table at each plot. It will still only allocate data colors
\r
35 as needed, but all of the pre-set or configured data colors will be
\r
36 available for each plot.
\r
39 -----------------------------------------------------------------------------
\r
41 2010-12-04 Release 5.3.0
\r
45 This is the current stable release of PHPlot. This release includes new
\r
46 plot types and some new features.
\r
48 The PHPlot reference manual has been updated to match this release. Some of
\r
49 the sections have been moved, there are new examples for the new plot types,
\r
50 and a new section on tunable parameters has been added.
\r
53 New features in 5.3.0:
\r
55 #3093483 "Investing support chart types":
\r
56 Added 3 new plot types: Basic OHLC (Open/High/Low/Close), Candlesticks,
\r
57 and Filled Candlesticks. These are variations of plots that show the
\r
58 performance of a stock or other financial security.
\r
60 #3111166 "Control legend colorbox width":
\r
61 It is now possible to control the width of the color boxes in the
\r
62 legend, using a class variable which is documented in the manual.
\r
64 #3117873 "Data value labels in more plot types":
\r
65 Data value labels, which show the dependent variable values near the
\r
66 data points, are now available for more plot types: lines, linepoints,
\r
67 points, and squared. (These were previously available only for bars and
\r
70 #3127005 "Ability to suppress X/Y axis lines":
\r
71 New functions SetDrawXAxis() and SetDrawYAxis() were added to control
\r
72 display of the X and Y axis lines. (These lines were probably the only
\r
73 PHPlot elements that could not be turned off.) In special cases, these
\r
74 can be used to produce a "bare" plot image.
\r
77 -----------------------------------------------------------------------------
\r
79 2010-10-03 Release 5.2.0
\r
83 This is the current stable release of PHPlot. This release includes some
\r
84 bug fixes and new features, described below, and a reimplementation of
\r
85 internal processing of colors.
\r
87 The PHPlot reference manual has been updated to match this release.
\r
88 Horizontal plots are now documented in the manual, and the interim
\r
89 documentation in the source release (HorizontalBars.txt) has been removed.
\r
90 The manual is available in HTML format as a separate download from
\r
91 Sourceforge. The manual is also available for on-line viewing from the
\r
92 project home page. Starting with this release, the manual is also
\r
93 available in PDF format from the project home page.
\r
96 Cautions, Important Notes, and Compatibility Issues:
\r
98 Due to changes in color allocation (see bug #3049726 below), image files
\r
99 produced with PHPlot-5.2.0 will differ when compared byte-for-byte with
\r
100 those created by earlier releases, even when the images are identical (as
\r
101 they nearly always are).
\r
103 If you are creating a horizontal plot with any negative X values, and not
\r
104 setting the Y axis position, your plot will change (see bug #3074402 below)
\r
105 because PHPlot no longer leaves the Y axis on the left for horizontal plots.
\r
107 Some internal methods that used to have 'public' visibility are now protected.
\r
108 This will generally prevent you from using them. The list of changed functions
\r
109 can be found in the release ChangeLog. Avoid using any internal methods.
\r
111 If you are making a stackedbar plot with any negative values, PHPlot-5.1.3
\r
112 and earlier took the absolute value of each data value (which was not
\r
113 documented), but PHPlot-5.2.0 does not. See Feature Request #3073679 below.
\r
115 If your plot fills the 256 available color map slots in a palette image,
\r
116 your image may look different with PHPlot-5.2.0 due to changes in color
\r
117 allocation order. This was seen on two of the tests in the PHPlot test
\r
118 suite. These tests tiled a JPEG image into the plot area or image
\r
119 background. Being a truecolor image, the JPEG had a huge number of colors,
\r
120 which filled all available slots in the color map. Additional colors for
\r
121 plot elements had to be approximated, and different colors resulted with
\r
122 PHPlot-5.2.0 versus previous releases. To avoid this problem, either use a
\r
123 truecolor PHPlot object (PHPlot_truecolor constructor), or reduce the
\r
124 number of colors in the background image and convert it to PNG or GIF.
\r
126 This release contains significant changes to PHPlot internals. In particular,
\r
127 variables and functions related to element colors and color handling have
\r
128 changed. Refer to the PHPlot release ChangeLog for more details. Remember,
\r
129 if you rely on accessing any member variable, or on using any non-public
\r
130 function or any function not documented in the reference section of the manual,
\r
131 your code is at risk of breaking with each new release.
\r
134 New features in 5.2.0:
\r
136 #3077554 "Finer control over plot element colors" (partial):
\r
137 The X, Y, and main titles can now have different colors. See the PHPlot
\r
138 Reference Manual entries for SetXTitleColor and SetYTitleColor.
\r
140 #3073679 "Stacked bar plots with negative values":
\r
141 A stacked bar plot can now include negative values, and stacks of negative
\r
142 values will be drawn downwards (or leftwards). See the PHPlot Reference
\r
143 Manual under "Plot Type: stackedbars" for details.
\r
146 Bugs Fixed in 5.2.0:
\r
148 #3045131 "SetTransparentColor problems":
\r
149 Setting a transparent color now works whether before or after setting
\r
150 the background color (for example), and also now works with a data color.
\r
152 #3049726 "Optimize color allocation"
\r
153 PHPlot now defers allocating colors until drawing time, and tries to allocate
\r
154 only the colors which are actually needed. For palette images, this results
\r
155 in use of fewer color slots and slightly smaller image files.
\r
157 #3074402 "Fix Y axis default for horizontal plots":
\r
158 When horizontal plots were introduced, an asymmetry with the X and Y axis
\r
159 position defaults was known but left. This behavior was later determined
\r
160 to be unhelpful. So now the Y axis on horizontal plots will default to X=0,
\r
161 or the X value closest to zero within the plot area range. This is the same
\r
162 behavior as for the X axis in vertical plots.
\r
164 #3056991 "Internal methods should be 'protected'":
\r
165 More of the internal PHPlot functions were changed to 'protected' visibility,
\r
166 as the test suite was fixed to not call them directly.
\r
168 #3057000 "Review 'deprecated' methods":
\r
169 One broken deprecated method (SetColor) was removed and one changed.
\r
170 Note that deprecated methods are not documented and not tested.
\r
172 -----------------------------------------------------------------------------
\r
174 2010-08-30 Release 5.1.3
\r
178 This is the current stable release of PHPlot. Additional horizontal plot
\r
179 types and features have been added, however horizontal plots are still
\r
180 considered 'experimental'. A new callback has been added which allows
\r
181 greater control over the data colors. An improved method for accessing
\r
182 TrueType Font (TTF) files means that on many systems TTF text can be used
\r
183 without specifying font paths.
\r
186 Cautions and Important Notes:
\r
188 Since the previous PHPlot release, PHP-5.3.3 and PHP-5.2.14 have been
\r
189 released, and these include a fix for the TrueType Font (TTF) rendering
\r
190 problem. Use of these releases is now recommended.
\r
192 There has been extensive cleanup of the PHPlot code. If you have a
\r
193 customized version of PHPlot, you may find it difficult to update.
\r
195 The "additional data support" script phplot_data.php has been removed from
\r
196 this release. The script has not been developed or tested in a long time,
\r
197 and was found to have numerous problems. The script can still be found in
\r
198 the CVS repository.
\r
200 The changes in this release (horizontal plots, custom data color callback,
\r
201 and TrueType Font handling) should not result in any compatibility issues.
\r
204 New features in 5.1.3:
\r
206 #3049703 "Additional horizontal plots and features":
\r
207 + Implemented data values labels in horizontal bar charts.
\r
208 Use: SetXDataLabelPos('plotin').
\r
209 + Add horizontal stacked bar charts, with data value labels.
\r
210 + Add horizontal thinbarline plots.
\r
211 Horizontal plots are still considered 'experimental', and documentation is
\r
212 in the HorizontalBars.txt text file rather than the PHPlot Reference Manual.
\r
214 #3034164 "Extended control of data colors":
\r
215 New callback 'data_color' can be used to customize selection of the color
\r
216 of each bar, line segment, point marker, etc. This is documented in the
\r
217 PHPlot Reference Manual section "Custom Data Color Selection", with new
\r
218 examples in the Examples chapter.
\r
221 Bugs Fixed in 5.1.3:
\r
223 #3051906 "Better choice for default TT font":
\r
224 Rather than always using the unlikely 'benjamingothic.ttf' as its default
\r
225 TrueType font name, PHPlot now has a short list of sans-serif fonts, and
\r
226 tries to find one that works if a default TT font is needed. On many
\r
227 systems, this will provide a high-quality default font without help.
\r
229 #3051832 "Let PHP/GD find the font file":
\r
230 Instead of using file existence to validate a TT font file, PHPlot now
\r
231 just tries to use the font. This allows PHP/GD to use its own rules to
\r
232 try to find the font, without needing a pathname. This works on Windows
\r
233 and at least some Linux systems.
\r
235 #3048267 "phplot_data add-on is still broken"
\r
236 Not fixed. phplot_data.php has been removed from the release.
\r
238 -----------------------------------------------------------------------------
\r
240 2010-06-29 Release 5.1.2
\r
244 This is the current stable release of PHPlot. Truecolor image support is no
\r
245 longer considered 'experimental', and is now documented in the reference
\r
246 manual. There is a new experimental feature for horizontal bar charts. This
\r
247 release also contains a bug fix and new feature.
\r
250 Cautions and Important Notes:
\r
252 The advisory against using PHP-5.3.2 or PHP-5.2.13 with PHPlot if you use
\r
253 TrueType fonts (TTF) continues. See the item below for PHPlot-5.1.1. The
\r
254 good news is that this has been fixed by the PHP Team and will be in the
\r
257 Compatibility of data type and plot type are now checked completely. If
\r
258 you used an incorrect data type with certain plot types, your script may no
\r
259 longer work until you fix the data type. Specifically, the area, squared,
\r
260 and thinbarline plot types failed to check the data type they received, and
\r
261 treated anything other than 'data-data' as 'text-data'. If you have a
\r
262 squared plot with data type 'data-data-error', for example (which is not
\r
263 supposed to work), it did produce a plot, but will now result in an error.
\r
265 The addition of horizontal bar charts should not impact any existing plot,
\r
266 with one small exception. The function SetYDataLabelPos() used to accept
\r
267 some additional, undocumented options (plotleft, plotright, both, yaxis)
\r
268 and pass these through to SetYTickLabelPos() "for compatibility". It no
\r
269 longer does so, as some of those are now used for horizontal bar chart
\r
270 labels. To position Y tick labels, use only SetYTickLabelPos().
\r
273 New features in 5.1.2:
\r
275 #3002606 "Add to plot and image border options":
\r
276 SetPlotBorderType() now accepts 'right', 'top', and 'bottom', as well
\r
277 as an array of options. So you can now control exactly which of the 4
\r
278 border sides will be drawn.
\r
279 SetImageBorderType() now accepts 'solid' as a choice. This will use the
\r
280 actual color set with SetImageBorderColor(), rather than the darker
\r
281 shade as type 'plain' does (which may have been a bug).
\r
282 SetImageBorderWidth() is a new function that sets the width of the image
\r
283 border. The defaults are the same as the fixed values used before: 1
\r
284 pixel for plain, 2 pixels for raised. The image border width is now
\r
285 accounted for in margin calculations, if it is greater than 2 (to make
\r
286 sure existing plots will not change).
\r
288 #2885930 "Horizontal Bars":
\r
289 Horizontal bar charts are implemented, as an experimental feature.
\r
290 'Experimental' means they are not yet documented in the reference manual,
\r
291 and subject to change or removal.
\r
292 Refer to the text file HorizontalBars.txt for details.
\r
294 #2947679 (follow-up) "Support for alpha blending/Truecolor":
\r
295 Truecolor support is now documented in the Reference Manual. The interim
\r
296 documentation file Truecolor.txt has been removed. Alpha channel
\r
297 specification now works with both constructors and both image types. This
\r
298 fixes an issue if the base constructor was used with a truecolor background
\r
299 image. (In PHPlot-5.1.1, the result would be a truecolor image, but the
\r
300 alpha channel features were not available.)
\r
303 Bug Fixed in 5.1.2:
\r
305 #3010116 "Bad rendering of title in multi-plot image when using TTF":
\r
306 Make sure the main title is drawn only once, to avoid bad rendering of
\r
307 TTF titles with multiple plots due to anti-aliasing.
\r
309 -----------------------------------------------------------------------------
\r
311 2010-04-04 Release 5.1.1
\r
315 This is the current stable release of PHPlot. This release adds truecolor
\r
316 image support as an experimental feature, fixes a number of bugs and adds
\r
317 a few new features.
\r
319 The PHPlot reference manual has been updated to match this release. The
\r
320 manual is available as a separate download from Sourceforge. The manual is
\r
321 also available for on-line viewing from the project home page.
\r
323 See the ChangeLog file in the release for more about changes and bug fixes.
\r
326 Cautions and Important Notes:
\r
328 Avoid using PHP-5.3.2 or PHP-5.2.13 with PHPlot if you use TrueType fonts
\r
329 (TTF). Some new bugs were introduced in those releases that adversely
\r
330 affects accurate positioning and rendering of TrueType font text.
\r
333 New features in 5.1.1:
\r
335 #2947679 "Support for alpha blending/Truecolor":
\r
336 PHPlot can now produce truecolor images, with alpha blending of colors and
\r
337 other effects. This is considered an experimental feature, meaning it is
\r
338 not yet documented in the PHPlot Reference Manual, and subject to change.
\r
339 Refer to the text file Truecolor.txt included in the PHPlot release for
\r
340 information on using truecolor.
\r
341 Two drawing changes were made to improve plot appearance with Truecolor:
\r
342 + Filled dots (in points & linepoints plots) are now drawn better. This
\r
343 also makes them look rounder with regular (non-Truecolor) plots.
\r
344 + Area plots have the areas filled without overlapping each area down to
\r
345 the Y axis. This was needed to fix problems with alpha blending, and
\r
346 should have no effect on non-Truecolor plots.
\r
348 #2973995 "Add y-Data to Stackedbars":
\r
349 You can now have Y Data Labels with 'stackedbars' plots. These label the Y
\r
350 values (incremental and total) for each bar. Refer to the reference manual
\r
351 page for SetYDataLabelPos().
\r
354 Bug Fixes in 5.1.1:
\r
356 #2976735 "Improvements and fixes for 'area' plots":
\r
357 Moving X axis works; handle Y<0 better; new 'stackedarea' plot type is a
\r
358 variation on 'area' with the data represented differently.
\r
360 #2974639 "Stacked bars plot breaks with X axis != 0":
\r
361 Moving X axis works.
\r
363 #2963757 "point_counts undefined error in 5.1.0":
\r
364 Fixed an error introduced in PHPlot-5.1.0 when point size and shape arrays
\r
365 were set to the same size.
\r
367 #2938219 "Bars go in wrong direction":
\r
368 For bar charts with all Y<0, bars will still be drawn down even if Y=0 is
\r
371 -----------------------------------------------------------------------------
\r
373 2009-12-24 Release 5.1.0
\r
377 This is the current stable release of PHPlot. This release fixes a number of
\r
378 bugs and adds some new features. Some of the changes in this release can
\r
379 alter the appearance of plots, so be sure to review the information in this
\r
380 NEWS file and test this release with your application.
\r
382 The PHPlot reference manual has been updated to match this release. The
\r
383 manual is available as a separate download from Sourceforge. The manual is
\r
384 also available for on-line viewing from the project home page.
\r
386 See the ChangeLog file in the release for more about changes and bug fixes.
\r
389 New features in 5.1.0:
\r
391 + A new "contrib" directory has been added for useful add-ons.
\r
392 This currently contains:
\r
393 * prune_labels : Control data label density on X axis.
\r
394 * color_range : Define a gradient map for data colors.
\r
396 + Feature Request 2899921 "Allow different format for data and tick labels"
\r
397 Text angle and format can now be controlled separately for data labels.
\r
399 + Locale loading override
\r
400 New variable locale_override stops PHPlot from getting locale from system.
\r
402 + Translating Coordinates
\r
403 New function GetDeviceXY() to translate world to device coordinates.
\r
405 + New drawing callback
\r
406 New callback 'draw_all', called after all drawing is done.
\r
407 The manual now contains an example of using this new callback and
\r
408 the new GetDeviceXY() function to annotate a plot.
\r
411 Bug Fixes in 5.1.0:
\r
413 #2914403 "Pie + X/Y titles: Undefined property error"
\r
414 X/Y titles are now properly ignored for pie charts.
\r
416 #2908256 "Error: array_sum() should be an array" (drupal)
\r
417 #2916864 "Should at least print legend on pie charts with empty data"
\r
418 Pie charts with invalid data (no Y values > 0) now make an empty plot.
\r
420 #2906436 "Fixes for X Tick Labels vs X Data Labels"
\r
421 Smarter determination of whether to do Tick labels, Data labels, or both.
\r
423 #2900914 "Problem with display of 0 on Y axis"
\r
424 Fixed rounding error that could produce something like Y=8.12345E-16.
\r
426 #2886365 "PHP 5 patch" (Declare all functions and variables in PHP5 style)
\r
427 Most internal PHPlot member functions now have "protected" visibility.
\r
429 #2839547 "SetImageBorderType('none')
\r
430 You can use SetImageBorderType('none') to turn the image border back off.
\r
432 #1795972 "Fix default point shapes"
\r
433 We now have 20 (vs 10) point shapes, with 10 (vs 1) used by default.
\r
435 #1795971 "Fix default data colors"
\r
436 We now have 16 (vs 8) default data colors, no duplicates, all visible.
\r
439 Visible Changes and Possible Incompatibilities:
\r
441 + PHP5 visibility changes (Bug #2886365)
\r
442 Details: Most internal PHPlot member functions now have visibility
\r
443 'protected', rather than all being public. All member variables are
\r
446 Reason for the change: Use the recommended PHP5 syntax, better OO style.
\r
448 Compatibility: If you were calling a PHPlot internal function that got
\r
449 changed to 'protected', this will break. Please report this.
\r
452 + Fix default point shapes (Bug 1795972)
\r
453 Details: We now have 20 (vs 10) point shapes available, and by default we
\r
454 have 10 (vs 1) different shapes in use. The default size is now 6 pixels
\r
455 for all point shapes.
\r
457 Reason for the changes: Using different shapes helps distinguish the data
\r
458 sets. The existing 10 defined shapes were not enough, since some of them
\r
459 are not centered over the points, too small, or otherwise hard to see.
\r
460 The code to synchronize the point shape and size arrays was broken, and
\r
461 some dubious code to adjust sizes to even numbers needed to be fixed.
\r
463 Compatibility (1): If you have a points or linepoints plot with more than
\r
464 one dataset, and you did not use SetPointShapes() to configure the
\r
465 shapes, them your plot will change from using a diamond for all data
\r
466 sets to using different shapes for up to 10 data sets.
\r
468 Compatibility (2): Fixing the point size/point shape array size bug may
\r
469 slightly change the size of some shapes, but it now works the way it
\r
470 was documented and supposed to work.
\r
472 + Fix default data colors (Bug 1795971)
\r
473 Details: Defined a new set of 16 default data colors. The colors are
\r
474 different and contrast well against the default white background.
\r
475 The first 4 colors were not changed.
\r
477 Reason for the change: The default 8 data colors included two instances
\r
478 of orange, and one color which was invisible on a white background.
\r
480 Compatibility: Colors will change on any plot with more than 4 data sets
\r
481 where you did not use SetDataColors() to set your own data colors.
\r
483 + Re-used old function SetXDataLabelAngle()
\r
484 Details: SetXDataLabelAngle() now does something different.
\r
486 Reason for the change: This name was needed for a new function, to set the
\r
487 angle for the X Data Labels. The old use of this function was not
\r
488 documented, and marked "deprecated" in the code since around 2003-12-07.
\r
490 Compatibility: If you are still using SetXDataLabelAngle() to set both Tick
\r
491 and Data label angles, you need to use SetXLabelAngle() instead.
\r
493 + Separate controls for tick and data labels (Feature Request 2899921)
\r
494 Details: New functions SetXDataLabelAngle(), SetYDataLabelAngle(),
\r
495 SetXDataLabelType(), and SetYDataLabelType() to allow separate control
\r
496 over the angle and format of data labels, versus tick labels.
\r
498 Reason for the change: Allow Data Labels to use different formatting and
\r
499 angle compared to Tick Labels.
\r
501 Compatibility: The default behavior has been set up such that there should
\r
502 be no compatibility issues. For example:
\r
503 Old behavior: SetXLabelType() sets the type for both tick and data labels.
\r
504 New behavior: SetXLabelType() sets the type for tick labels and the
\r
505 default type for data labels. SetXDataLabelType() sets the type for
\r
506 data labels (overrides SetXLabelType).
\r
508 + X Tick Labels vs X Data Labels (Bug 2906436)
\r
509 Details: Regarding SetXTickLabelPos() and SetXDataLabelPos(): If only one
\r
510 of them is called, the behavior is unchanged (only that label type will
\r
511 be displayed). If both are called: Do exactly what was requested. If
\r
512 neither was called: display only data labels if any data labels are
\r
513 non-empty, else display only tick labels.
\r
515 Reason for the change: 1) Fix the long-standing problem behavior that by
\r
516 default PHPlot overlays tick and data labels below the X axis. 2) Fix
\r
517 order dependency between setting the position of tick and data labels.
\r
518 3) Prepare for future extension of data labels, and allow both tick
\r
519 and data labels to be on if the programmer enables both.
\r
521 Compatibility: There are some cases where your plot will change.
\r
522 (a) Calls neither SetXDataLabelPos() nor SetXTickLabelPos():
\r
523 Old behavior: Both tick and data labels displayed, possibly overlaid.
\r
524 New behavior: If there are any non-blank data labels, then show only
\r
525 the data labels, not the tick labels. Otherwise, show tick labels.
\r
527 (b) Calls both SetXDataLabelPos() and SetXTickLabelPos(), with other than
\r
528 'none' for each position:
\r
529 Old behavior: The latter call was effective; earlier one ignored.
\r
530 New behavior: Independent of order, both calls are effective.
\r
532 -----------------------------------------------------------------------------
\r
534 2009-06-14 Release 5.0.7
\r
538 This is the current stable release of PHPlot. The release adds one new
\r
539 feature, fixes a few bugs, and changes the license under which PHPlot
\r
542 The PHPlot reference manual has been updated to match this release. The
\r
543 manual is available as a separate download from Sourceforge. The manual is
\r
544 also now available for on-line viewing at http://phplot.sourceforge.net
\r
546 See the ChangeLog file for more about changes and bug fixes.
\r
551 PHPlot is now released on the terms of the GNU Lesser General Public
\r
552 License, version 2.1. (Previous versions of PHPlot were released under
\r
553 a dual "PHP/GPL" license.) The licensing change was authorized by the
\r
554 original author and copyright holder of PHPlot.
\r
557 New feature in 5.0.7:
\r
559 + Plot area margins can now be partially specified, using either
\r
560 SetMarginsPixels or SetPlotAreaPixels. In previous releases of
\r
561 PHPlot you had to either specify all 4 margins or none.
\r
562 Credit to adoll for this feature.
\r
565 Visible Changes and Possible Incompatibilities:
\r
567 + Y data range can change:
\r
568 As a result of the bug fixes in this release, automatically-calculated
\r
569 Y data ranges can change. If you have missing Y values in your data,
\r
570 and you let PHPlot calculate the Y data range (that is, you do not
\r
571 call SetPlotAreaWorld with a Ymin value), then the lower limit for Y
\r
572 can change. If you have a plot with data-data-error data type, different
\r
573 error values for different points, and let PHPlot calculate the Y data
\r
574 range, then either Y limit can change.
\r
577 Bug Fixes in 5.0.7:
\r
580 + Fix for bug 2803900: SetRGBArray('large') does not work:
\r
581 Corrected an array name usage problem. You can now select the large
\r
582 color map. Also PHPlot no longer overrides use of the PHP include
\r
583 path when loading the large color map, and now reports an error if the
\r
584 file is needed and not found.
\r
586 + Fix for bug 2791502 "Error plots treat missing Y values as 0":
\r
587 Missing Y values now with with data-data-error plots.
\r
589 + Fix for bug 2792860 "Wrong DataLabelLines with missing Y":
\r
590 Data label lines are now suppressed at missing Y values.
\r
592 + Fix for bug 2786350 "Missing Y data results in bad auto-range":
\r
593 Missing Y values are now ignored when calculating the Y data range.
\r
594 Bug report and analysis by mrten.
\r
596 + Fix for bug 2786354 "Incorrect auto-range for data-data-error":
\r
597 The Y data range is now correctly calculated for data-data-error plots
\r
598 when the error values differ from point to point.
\r
601 -----------------------------------------------------------------------------
\r
603 2009-01-20 Release 5.0.6
\r
607 This is the current stable release of PHPlot. The purpose of this release
\r
608 is to fix additional problems with text spacing and positioning, and
\r
609 introduce some minor new features.
\r
611 The PHPlot reference manual has been updated to match this release. The
\r
612 manual is available as a separate download from Sourceforge. The manual is
\r
613 also now available for on-line viewing at http://phplot.sourceforge.net
\r
616 New features in 5.0.6:
\r
618 + Allow mixing GD and TrueType font text on the same plot
\r
619 You can use the new method functions SetFontGD() and SetFontTTF() to
\r
620 select a font and font type for text element (labels, titles, etc.) For
\r
621 example, you can have TrueType plot titles, and GD-fixed font labels.
\r
622 SetUseTTF() now sets the default text type, TTF or GD. This is fully
\r
623 backward compatible.
\r
625 + Extended label formatting
\r
626 See the reference manual for more information on these.
\r
628 New label formatting types are added: 'printf' (using a user-defined
\r
629 format), and 'custom' (using a callback function).
\r
631 For 'data' type formatting, a prefix and suffix can be added. (PHPlot
\r
632 previously had an undocumented suffix for 'data' type, which still
\r
635 For 'time' formatting, the format can now be specified in the same function
\r
636 call rather than using SetXTimeFormat and SetYTimeFormat.
\r
638 For 'data' formatting, the precision can now be specified in the same
\r
639 function call, rather than using SetPrecisionX and SetPrecisionY.
\r
641 + Better control over line spacing in multi-line labels
\r
643 Line spacing can now be set separately for each text element using an
\r
644 additional argument to SetFont, SetFontGD, and SetFontTTF. The overall
\r
645 SetLineSpacing() value is the default for each text element that does not
\r
646 have a specific line spacing set.
\r
648 PHPlot now interprets the value set for line spacing as the number of
\r
649 pixels only for GD text. For TrueType text, it is a scale factor for the
\r
650 font's built-in line spacing for TrueType text. The equation used is:
\r
651 interline_spacing = line_spacing * font_natural_spacing / 6
\r
652 where line_spacing is either the global value set with SetLineSpacing
\r
653 or a more specific value set with SetFont(), and font_natural_spacing
\r
654 is the amount of space between lines built-in to the TrueType font. The
\r
655 factor 6 should really be 4 (since PHPlot always used 4 as the default
\r
656 line_spacing, this would give the natural font spacing by default). But
\r
657 the text is too widely spaced with this value, and 6 was chosen to be
\r
658 more compatible for typical font sizes.
\r
660 Visible Changes and Possible Incompatibilities:
\r
663 Multi-line TrueType titles and labels will have different inter-line
\r
664 spacing. Since the text size affects the margin and plot area sizes,
\r
665 this results in slightly different sized features on any plot with
\r
666 multi-line TrueType text.
\r
667 Previous versions of PHPlot used a default 4 pixels for inter-line
\r
668 spacing of multi-line TrueType text, regardless of the font size.
\r
669 PHPlot now uses the 'natural' font inter-line spacing, adjusted by a line
\r
670 spacing parameter (per text type, with a global default).
\r
672 The same change can also increase the size of the legend box slightly.
\r
674 + Internal changes were made to the way font information is stored. Anything
\r
675 that directly references PHPlot internals regarding fonts will break. Usage
\r
676 also changed for the internal functions to size and draw text (ProcessText*,
\r
677 SizeText*) due to font data storage changes.
\r
679 + Changes were made to internal class variables used to store label
\r
680 formatting information. Anything relying on these internals may break.
\r
683 Bug Fixes in 5.0.6:
\r
685 #1932571: Data-Data Plot fails with same X values
\r
686 PHPlot will no longer hang if all X values are the same. But this is
\r
687 interim fix to force the X range to 1 to prevent the hang. Eventually,
\r
688 smarter automatic range code will handle this better.
\r
689 Credit to andyl for finding this.
\r
691 #1891636: Misaligned TTF X Labels
\r
692 PHPlot will now correctly line-up TrueType labels along the X axis. There
\r
693 were small but very noticeable errors before, when the text had descenders
\r
694 or lines with all short letters.
\r
697 -----------------------------------------------------------------------------
\r
699 2008-01-13 Released 5.0.5
\r
703 This is the current stable release of PHPlot. The emphasis of this release
\r
704 is to improve text positioning, margin calculation, and error handling.
\r
706 Although this is considered a stable release, it has a large amount
\r
707 of changed code compared to the previous release 5.0.4. Two of the more
\r
708 complex components of PHPlot - text and margin calculations - were mostly
\r
709 re-written in this release. You are advised to carefully test your own
\r
710 applications with PHPlot-5.0.5 to see how your plots look. Refer to the
\r
711 README.txt file included in the release for information on reporting problems.
\r
713 Starting with this release, PHPlot no longer supports PHP4, since the PHP
\r
714 group officially declared end-of-life for PHP4 as of 31 December 2007.
\r
715 PHPlot-5.0.5 was tested only with PHP-5.2.5 and we are unlikely to address
\r
716 any issues using PHPlot with older versions of PHP.
\r
718 The PHPlot reference manual has been updated to match this release. The
\r
719 manual is available as a separate download from Sourceforge. The manual is
\r
720 now also now available for on-line viewing at http://phplot.sourceforge.net
\r
722 The callback feature added in 5.0.4 is now documented in the reference
\r
723 manual. It is still considered experimental and subject to change, however.
\r
727 Visible Changes and Possible Incompatibilities:
\r
729 + Dropped support for PHP4.
\r
731 + Eliminated remaining order-dependent behavior related to margins and
\r
732 text. PHPlot should now do nothing at all, except record parameters, until
\r
733 you draw the graph with DrawGraph. I believe this was always the intended
\r
734 behavior of PHPlot, but over time perhaps various pre-calculations and
\r
735 dependencies crept in. Fixing this simplifies processing and should lead to
\r
736 more consistent behavior.
\r
738 + The rewritten margin calculation code now uses actual sizes of all tick
\r
739 and data labels and tick marks, rather than guesses. Margins collapse to
\r
740 remove unused elements, but a minimum margin (currently fixed at 15 pixels)
\r
741 is applied so the plot edges don't get to close to the image edges. The
\r
742 result is that most graphs with auto-calculated margins will change in
\r
743 appearance. It most cases, the margins get slightly smaller. In other
\r
744 cases, earlier releases mis-calculated the margins, so this release will
\r
745 produce much neater margins.
\r
747 + The X and Y titles are now offset out from the plot area, not in from the
\r
748 image area. For auto-calculated margins this should not make any
\r
749 difference, but if you use SetMarginsPixels or SetPlotAreaPixels to set
\r
750 larger margins, the axis titles will move in closer to the plot with this
\r
753 + Changes were made to PHPlot internals, including removal of some class
\r
754 variables and functions, and addition of new variables and functions.
\r
755 These are documented in the ChangeLog. Relying on any internal variables
\r
756 or functions in an application using PHPlot is unwise. The following
\r
757 internal functions were removed:
\r
758 SetImageArea() DrawDotSeries() DrawLineSeries() CalcXHeights()
\r
759 CalcYWidths() DrawLabels() InitImage() DrawDashedLine()
\r
760 These were marked 'deprecated', were undocumented and unmaintained.
\r
762 This was replaced with SizeText().
\r
764 + Line spacing set with SetLineSpacing() now affects TTF text as well as
\r
765 GD text. Previously, it only affected GD text. The default line spacing
\r
766 happens to be usable for TTF text.
\r
768 + Changes were made to error handling. PHPlot will now trigger a user-level
\r
769 error after producing an error image, instead of exiting. If no error
\r
770 handler has been set, it will exit, as before. But now the error message
\r
771 should also get logged, or written to the standard error stream, depending
\r
772 on the SAPI in use. You can now establish an error handler to catch most
\r
773 PHPlot errors and do some cleanup before exit.
\r
775 + PHPlot no longer accepts some invalid option values (such as a substring
\r
776 of a valid value, or empty strings) passed to functions. If your
\r
777 application aborts in CheckOption with PHPlot-5.0.5 but 'worked' with
\r
778 previous releases, them you were probably using an invalid option value.
\r
782 Bug Fixes in 5.0.5:
\r
784 #945439: x_tick_label_height not set correctly
\r
785 Exact sizes of labels are now used to calculate margins.
\r
787 #1813070: Bad position for multi-line TrueType text
\r
788 Fixed as part of text functions rewrite. Use correct basepoint
\r
789 (lower left of each line) when positioning text lines.
\r
791 #1813071: Wrong title height for multi-line TTF text
\r
792 Fixed as part of text functions rewrite: calculate height of
\r
793 multi-line text correctly. Also now uses the line-spacing setting.
\r
795 #1813474: DrawText alignment arguments wrong
\r
796 Fixed so 'top' and 'bottom' now have the usual meaning: top means
\r
797 align top of text with reference, bottom means align bottom of text.
\r
798 This was switched before. Changed every internal caller to compensate.
\r
800 #1816844: Fix order dependency for setting titles
\r
801 Defer processing of title strings until DrawGraph(),
\r
802 so it doesn't matter if fonts, etc. are set before or after.
\r
804 #1819668: Horiz. align multi-line text: GD vs TTF
\r
805 The text functions were rewritten to draw TTF text line-by-line,
\r
806 like GD text, and correctly align each line.
\r
808 #1823774: Default Font Path and Error Message
\r
809 Error handling has been improved to make sure a message is logged, in
\r
810 addition to the error image, and use error_trigger rather than exit.
\r
812 #1826513: FIXME in DrawLegend: Max label length
\r
813 The actual size needed for legend text is now used.
\r
815 #1827263: Spoiled up pie-chart if $val is close to zero
\r
816 Fixed by skipping over any segment that rounds to 0 degrees of
\r
817 arc. (The GD function uses integer angles only, and 0 degrees
\r
818 means draw a complete circle.)
\r
820 #1836528: Insufficient checking of parameter values
\r
821 Rewrote validator function to reject improper parameter values.
\r
823 #1843012: Make margins, drawing consistent
\r
824 Margin code logic was rewritten and checked for consistency.
\r
826 #1856207: Margin error with 'xaxis'/'yaxis' position
\r
827 Margin space is now allocated for ticks and labels if their position
\r
828 is 'xaxis' or 'yaxis' and the axis is at the plot edge. This is not
\r
829 a perfect fix (the axis could be close but not at the edge).
\r
832 -----------------------------------------------------------------------------
\r
834 2007-10-20 Released 5.0.4
\r
838 This is the latest stable release of PHPlot. We are abandoning the 'rc'
\r
839 version naming style, because we don't consider these last releases
\r
840 'release candidate' versions. As we continue to make changes to PHPlot,
\r
841 we are not converging toward a final "5.0" release, however we do consider
\r
842 these releases stable and complete enough for production use.
\r
844 This release fixes a number of problems and introduces a few new features.
\r
846 The PHPlot reference manual has also been updated to match this release.
\r
847 New material has been added documenting some of the PHPlot internals.
\r
848 The manual is available as a separate download from Sourceforge.
\r
853 Some code cleanup is going in to this release. It is hoped that these
\r
854 changes will not impact any existing scripts using PHPlot, but will make
\r
855 the PHPlot code itself easier to understand and maintain.
\r
857 PHPlot now avoids making changes outside its own class definition. There
\r
858 are no longer any functions defined outside the class, nor any constants.
\r
859 Three constants (MINY MAXY TOTY) were removed, and 2 functions were removed
\r
860 (see Visible Changes below). Also PHPlot no longer sets the PHP error
\r
861 reporting level to E_ALL. Although we highly recommend setting error
\r
862 reporting to E_ALL in your php.ini file or scripts, it is not right for
\r
863 PHPlot to assume that you want it.
\r
866 Visible Changes and Possible Incompatibilities:
\r
868 Arrays containing color and style information are used with several PHPlot
\r
869 functions to control the plot style array. These functions are:
\r
870 SetPointShapes, SetPointSizes, SetLineWidths, SetLineStyles,
\r
871 SetDataColors, SetDataBorderColors, and SetErrorBarColors.
\r
872 The arrays passed to these functions MUST used sequential integer 0-based
\r
873 indexes. This is what the PHP manual calls "Usual integer indices (starting
\r
874 from zero, increasing by one)". This is the type of array you get in PHP by
\r
875 default if you use array() without specifying key values, or use the
\r
876 empty-bracket assignment operator to add values onto an array. In previous
\r
877 versions of PHPlot, some of these functions would also work with
\r
878 string-indexed or non-sequentially-indexed arrays, but this was not clearly
\r
879 defined. Starting with PHPlot-5.0.4, only arrays with "usual integer
\r
880 indices" work, and other array indexes will cause errors.
\r
882 Some internal-use-only functions have had their usage changed or been removed.
\r
883 If you are using functions that are not documented in the PHPlot Function
\r
884 Reference in the manual, your code may have to be changed.
\r
886 As part of the code cleanup, two functions which were defined outside the
\r
887 PHPlot class were removed: array_pad_array(), and array_merge_php4().
\r
888 If your code used these, you need to fix your code.
\r
890 The routines which accept a color name, value, or array now check for a valid
\r
891 color name. If you specify a color name which is not in your current color
\r
892 table, PHPlot will draw an error and exit. Previously, PHP would report an
\r
893 index error, continue, and get a 'headers already sent' message.
\r
896 Bug Fixes in 5.0.4:
\r
898 #1813021: Miss-positioned right-justified vertical GD text.
\r
899 Fixed DrawText() to correctly position 90 degree right-justified text
\r
900 drawn in a fixed GD font. This could be seen with 90 degree Y tick labels.
\r
902 #1790441 Removed destructor/shutdown function, and no longer recommend
\r
903 using reference assignment when creating a PHPlot object. This was
\r
904 interfering with memory usage.
\r
905 Credit to annajilly for analysis.
\r
907 #1779115 SetLegendWorld() failed because of undefined variables. The
\r
908 required order dependency was too hard to meet. This is now fixed.
\r
909 You can now use SetLegendWorld anywhere before DrawGraph.
\r
911 #1726810 (feature request, but actually a bug fix) Ignore empty strings
\r
912 as data labels when doing time or data label formatting. These would
\r
913 previously produce errors or bad formatting. Now you can omit labels
\r
914 as needed even with time and data formatting.
\r
915 Credit to exgerhardr for finding this.
\r
917 #1605555 Y data labels used wrong font and not formatted (bar charts only).
\r
919 #1208054 Localization of number formatting in 'data' format type. PHPlot
\r
920 will attempt to format the numbers in a way appropriate to your locale.
\r
921 You can also force the formatting with the new function SetNumberFormat.
\r
922 Credit to David Hernández Sanz.
\r
924 #937944 X/Y Tick counts: PHPlot could draw one two few Y tick counts, and
\r
925 one too many X tick counts. This is not a perfect fix, and more work is
\r
926 needed here, but this fixes an error case in both X and Y values.
\r
929 New Features in 5.0.4:
\r
931 New function SetLegendStyle allows control of the alignment of text and
\r
932 color boxes within the legend. Also allows removing the color boxes.
\r
933 Based on bug #1208054.
\r
934 Credit to David Hernández Sanz.
\r
936 New function SetNumberFormat. See bug report #1208054 above.
\r
938 Callbacks are added. PHPlot can call back your functions while generating the
\r
939 plot. This is experimental, and documented only in the file "Callbacks".
\r
940 Credit to annajilly for the idea and design.
\r
942 -----------------------------------------------------------------------------
\r
944 2006-11-13 Released 5.0rc3
\r
948 This is an interim release. It has been a long time since the previous
\r
949 release 5.0rc2, and there have been a lot of changes. There are still more
\r
950 changes likely to go in before we have "5.0", but there are enough for now.
\r
952 The PHPlot Reference Manual has also been released, and is available as a
\r
953 separate download from Sourceforge. PHPlot users and developers are
\r
954 strongly encouraged to read the manual.
\r
956 This release does not include the "doc/" and "examples/" directories of
\r
957 previous releases. The Reference Manual contains more complete and
\r
958 up-to-date information and examples, and I am unable to maintain the doc/
\r
959 and examples/ files while also maintaining the Reference Manual. If you
\r
960 need those files, they can be accessed with the Sourceforge web CVS
\r
966 The emphasis for this release is bug fixing, so there are few new features.
\r
968 + You can now suppress lines or points on individual plots in a linepoints
\r
969 graph. This feature was added because I needed a graph with several
\r
970 linepoints lines, but also with a solid line showing an "80% goal".
\r
971 Use SetPointShapes with the value 'none' in the array to suppress the
\r
972 point markers for that plot (and only draw the line).
\r
973 Use SetLineStyles with the value 'none' in the array to suppress the
\r
974 line for that plot (and only draw the point markers).
\r
977 + Bar charts can have data labels above the bar with the value. Turn
\r
978 these on with SetYDataLabelPos('plotin'). This is somewhat experimental,
\r
979 since there isn't a lot of room for labels on top of the bars and you
\r
980 may find the results are not useful.
\r
985 Here are the more significant changes in this release. These are changes
\r
986 which may affect existing scripts and output from PHPlot. See the
\r
987 ChangeLog file for information about all changes and bug fixes.
\r
989 + A bug fix on bar chart bar borders results in black borders around the
\r
990 bars if shading is turned off. The border was previously covered up,
\r
991 but was supposed to be there. If you need borderless, unshaded bars,
\r
992 you need to use SetDataBorderColors to make the borders the same colors
\r
993 as the bars. [Bug # 1096197]
\r
995 + TrueType font pathname handling was fixed. You no longer need to use
\r
996 SetUseTTF(True). You can either use full paths to the font files with
\r
997 SetDefaultTTFont() and SetFont(), or you can call SetTTFPath() to point
\r
998 to a directory of font files, and then use simple font filenames without
\r
999 paths in SetDefaultTTFont() and SetFont().
\r
1000 [Bug # 1144644 plus several others]
\r
1002 + There have been several fixes regarding automatically calculated ranges
\r
1003 and scales. The result is that you may see less extra space and fewer
\r
1004 tick marks in some cases.
\r
1006 + A fix was made to bar and stackedbar graph bar widths in order to get
\r
1007 the X axis labels to properly center. As part of the fix, the bar widths
\r
1008 now match between the two graph types. (Before this fix, the bars were
\r
1009 narrower in bar graphs compared to the same data plotted as a stacked
\r
1010 bar.) As a result, bar graph bars will now be drawn with wider bars, and
\r
1011 stackedbar graph bars will be narrower. You can adjust this with the new
\r
1012 class variable bar_extra_space. [Bug # 1437912]
\r
1014 + Dot shapes and sizes were off by 1 or 2 slots in the array of shapes or
\r
1015 sizes. After the fix, you may get different dot shapes or sizes per
\r
1016 plot line. [Bug # 1096194]
\r
1021 Since its output is visual (graphics), and it has so many interconnected
\r
1022 modes and options, PHPlot is difficult to test. But at least we are now
\r
1023 trying. I have a collection of PHPlot scripts (currently about 60) and a
\r
1024 script to run through them. The script automatically checks that:
\r
1025 1) Nothing was written to the standard error stream;
\r
1026 2) An image file of size greater than 0 was written;
\r
1027 3) Neither the test script nor PHPlot did exit(). This catches cases
\r
1028 where PHPlot aborts with DrawError().
\r
1030 The automated test is an easy way to check for serious regression, but you
\r
1031 really need to inspect the output files to validate PHPlot. This takes a
\r
1032 little time, and it is easy to overlook problems.
\r
1034 The real issue is test coverage. Just as we can be sure that future
\r
1035 PHPlot releases will pass the test collection, we can also be sure that
\r
1036 future bug reports will be written against untested cases.
\r
1038 --------------------
\r
1040 2006-11-08 PHPlot on Sourceforge has a new maintainer: lbayuk
\r
1042 --------------------
\r
1044 2004-10-24 Released 5.0rc2
\r
1046 --------------------
\r