PHP Classes

Simple Histogram: Generate an image with an histogram from data

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 50%Total: 2,249 All time: 1,733 This week: 74Up
Version License Categories
graph_histogram 1.0.0Freely DistributableGraphics, Statistics


This package is meant to generate a graphic image that represents an histogram from a given set of data values in an array.

It can draw a graph of bars with the supplied values, with a specified with and height, with optional horizontal and vertical axis scales and labels and the possibility of choosing the colors of the background and the axis labels. The colors of the bars are picked by the class automatically.

The graph image is created in true color and outputted in the PNG format using the PHP GD extension.

The class generate HTML IMG tags with the SRC attribute pointing to an URL based on the current script URL that passes the necessary parameters to the class to output the image graphic in the PNG format.

Picture of Pascal Toussaint
Name: Pascal Toussaint <contact>
Classes: 6 packages by
Country: France France
Age: 57
All time rank: 847 in France France
Week rank: 262 Down6 in France France Up

  Files folder image Files  
File Role Description
Plain text file class.graph.histogram.php Class Histogram class
Plain text file class.graph.php Class Base class for graph
Accessible without login Plain text file test_graph_histo.php Example An Exemple

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:1,733
This week:74Up
User Ratings User Comments (1)
 All time
Very simple but very useful
15 years ago (George Fisher)