Re: error while displaying a line
- From: "Alexey Shuvaev" <shuvaev physik uni-wuerzburg de>
- To: gtkdatabox-list gnome org
- Subject: Re: error while displaying a line
- Date: Fri, 19 Sep 2008 10:14:23 +0200
On Thu, Sep 18, 2008 at 10:04:10PM +0200, Dr. Roland Bock wrote:
> z pekar gmail com wrote:
>> Hello,
>> I get an error while displaying a line (parallel to x-achse; y(x) = c)
>>
>> gtk_databox_set_total_limits: assertion `left != right' failed
>>
>> what could it be?
>> thank you
>
> Hi,
>
> you are probably calling gtk_databox_auto_rescale?
>
> That function calculates
>
> (Pixel_max - Pixel_min)/(Value_max - Value_min)
>
> This fails for a line parallel to the x axis (and would also fail for a
> line parallel to the y axis).
>
> Of course it would be possible to "guess" a useful data range. The
> question is: What is the right heuristic, which seems natural for
> viewers at different values?
>
> Solutions are welcome :-)
>
I don't think one can have a good "guess" for all cases.
For example, when plotting some abstract mathematical function one may
set y_scale = x_scale. On the other hand, in a physics application when
x = time and y = voltage one may want to always include zero (y = 0) in
the graph and to set y scale to full device range if the signal is
a constant zero too.
So, IMHO, the proper scaling is a responsibility of the application developer
and not the library.
Just my 0.02$,
Alexey.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]