Re: Re: For all who wish to try Image_Graph
| From: | Stefan Neufeind | Date: | Sat, 01 Nov 2003 22:36:08 +0000 |
| Subject: | Re: Re: For all who wish to try Image_Graph | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-23189@lists.php.net to get a copy of this message | ||
On 1 Nov 2003 at 20:17, rocha@i-node.com.br wrote:
> Citando Stefan Neufeind <stefan@neufeind.net>:
>
> First let me say i was about time someone releases something like
> that. Thank you.
Thank you for the flowers :-) Please note, the class is still in an
early phase.
> > One (big?) limitation of the current release: The "ticks"
> > (separators on the Y-axes) aren't yet automatically generated by an
> > algorithm. This is due to the fact that I didn't find a generic way
> > to generate meaningful way to generate proper ticks automatically -
> > for all ranges from 0,0001 to 100.000.000 or so. You see the
> > problem?
>
> If you wich to generate ticks in this range, you must use a log axis
> not a linear one. Change the whatever-axis scale to log to go from
> that scale to a new one from -4 to 8 (On a log10 base) and then use a
> linear algorithm to divide the range. If a user wants a linear scale
> in that range, he should be able to do it. I really cant think about
> anything useful to do this way, but, that is up to the user.
The concept of Image_Graph already contained the possibility to later
switch from a linear scale to a logarithmic scale. And that's what I
planned to implement soon. It's possible in a central function ...
But what I meant with my comment / contribution request was:
If you have numbers like 0.0001, 0.0003453, 0.000457 and which to
draw them in there are two measurements to be taken if you let the
class do everything on it's own:
a) select appropriate min and max-values for the scale (currently not
implemented correctly for such small values)
b) find a way to generate appropriate ticks for the axes - e.g.
0.0001, 0.0002, 0.0003, 0.0004, 0.0005 in this example
But this is dependent on the range. Also there should be a way to
somehow select if you wish to have "many" or "few" ticks.
And if the range of values is from 100.000.000 to 100.998.005 surely
you will need to generate different ticks. Did that make it clear?
Sebastiao, I'd be happy if you could contribute a first algo for a
linear scale for this. We'll solve the logarithmic problem later I
guess ...
Regards,
Stefan Neufeind