Totally Stuck - GD Heatmap

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
HavokDelta6
Forum Newbie
Posts: 16
Joined: Mon Sep 28, 2009 4:11 pm

Totally Stuck - GD Heatmap

Post by HavokDelta6 »

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Last edited by HavokDelta6 on Tue Mar 20, 2012 5:59 am, edited 1 time in total.
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: Totally Stuck - GD Heatmap

Post by Jade »

I would setup an array of colors. Red being highest, blue being lowest, or however you decided you want higher elevations to be discerned from lower elevations.

Then run through your array, replace the higher numbers with the red/redish colors and the lower numbers with the lower/lower colors for each point on a new graphic image.

Take a look at this function: http://www.php.net/manual/en/function.imagesetpixel.php

You can go through pixel by pixel and set the appropriate color for that x,y coord.
Post Reply