PHPackages                             macocci7/php-histogram - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. macocci7/php-histogram

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

macocci7/php-histogram
======================

PHP-Histogram creates histograms using FrequencyTable.

1.4.0(5mo ago)367[1 issues](https://github.com/macocci7/PHP-Histogram/issues)MITPHPPHP &gt;=8.1

Since May 27Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/macocci7/PHP-Histogram)[ Packagist](https://packagist.org/packages/macocci7/php-histogram)[ RSS](/packages/macocci7-php-histogram/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (12)Used By (0)

PHP-Histogram
=============

[](#php-histogram)

1. Features
-----------

[](#1-features)

`PHP-Histogram` is a PHP Library which is easy to use for creating histograms.

You can create a simple Histogram just by setting `class range` and `data` and `filepath` to save.

[![](examples/img/HistogramBasicUsage.png)](examples/img/HistogramBasicUsage.png)

`Frequency Polygon`, `Cumulative Frequency Polygon`, `Cumulative Relative Frequency Polygon` and plotting `Frequency` are supported.

[![](examples/img/HistogramExample08.png)](examples/img/HistogramExample08.png)

Changing other properties, such as `Caption`, `X Label`, `Y Label`, Various `Color`s, `Canvas Size`, `Frame Ratio` and Various `Width` are supported.

[![](examples/img/ChangePropsByMethods.png)](examples/img/ChangePropsByMethods.png)

Transparent background is also supported.

[![TransparentBackground.png](examples/img/TransparentBackground.png)](examples/img/TransparentBackground.png)

2. Contents
-----------

[](#2-contents)

- [1. Freatures](#1-features)
- 2. Contents
- [3. Requirements](#3-requirements)
- [4. Installation](#4-installation)
- [5. Usage](#5-usage)
    - [5.1. Basic Usage](#51-basic-usage)
    - [5.2. Changing Properties By Methods](#52-changing-properties-by-methods)
    - [5.3. Changing Properties By Neon File](#53-changing-properties-by-neon-file)
    - [5.4. Changing Properties By Array](#54-changing-properties-by-array)
    - [5.5. Transparent Background](#55-transparent-background)
- [6. Examples](#6-examples)
- [7. License](#7-license)

3. Requirements
---------------

[](#3-requirements)

- PHP 8.1 or later
- Imagick PHP Extension

    Check with commands:

    ```
    php -i | grep imagick
    ```
- Composer

4. Installation
---------------

[](#4-installation)

```
composer require macocci7/php-histogram
```

5. Usage
--------

[](#5-usage)

### 5.1. Basic Usage

[](#51-basic-usage)

- PHP: [examples/BasicUsage.php](examples/BasicUsage.php)

    ```
