rabbl/heatmap

A library to create colorful png-images from 2D-Grid arrays

Maintainers

Details

github.com/rabbl/heatMap

Source

Issues

Installs: 609

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/rabbl/heatmap

v1.1.1 2017-05-02 21:07 UTC

This package is not auto-updated.

Last update: 2025-10-25 03:57:21 UTC


README

Software License Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight

Features

This library generates pixel images (png) from 2D-Grid values. You can setup a custom color spectrum for the interpolation.

Installation

Composer is used for installation. Add the following lines to your composer.json file:

"require": {
    "rabbl/heatmap": "^1.1"
}

Or install it on the command line: composer require rabbl/heatmap

Usage

$heatMap = new HeatMap();
$heatMap->setData(array(
    [0,1,2,3,5,6,7,8,9],
    [0,1,2,3,5,6,7,8,9],
    [0,1,2,3,5,6,7,8,9],
    [0,1,2,3,5,6,7,8,9],
    [0,1,2,3,5,6,7,8,9],
    [0,1,2,3,5,6,7,8,9]
));
$heatMap->setSpectrum('blue', 'green', 'yellow', 'red');
$fileName = $heatMap->createWithAbsoluteLimits($data, 0, 9);

Returns the temporary filename of the generated image.