I have a graph created with GD that displays the results of a poll. What it does is round the highest vote to the nearest 10 and plot the other results on the graph. The others should ideally be to scale however i cannot work out how I should plot the other results in comparison to the higest one. Can anyone help?

Thanks

    Hi ollmorris,

    OK suppose you've got three numbers ($a, $b, $c) and $h = max($a, $b, $c).

    If you change $h to $h_new (in your case, by rounding it, but it doesn't matter what you do to it) then ...

    $a_new = $a($h_new/$h)
    $b_new = $b
    ($h_new/$h)

    etc.

    You may want to round these results after.

    I think that's waht you're asking for.

    Paul.

      thanks very much. I got the problem sorted just before ya posted.

      Its funny cause I was so into the script I actually dreamt the solution. hahaha.

      Thanks anyway

        Write a Reply...