error while displaying a line



so maybe some default behavior should be implemented in order to avoid
the error output, and if the app. developer doesn't like it - he can
always rewrite it.

On Fri, Sep 19, 2008 at 11:14 AM, Alexey Shuvaev
<shuvaev physik uni-wuerzburg de> wrote:
> 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.
> _______________________________________________
> gtkdatabox-list mailing list
> gtkdatabox-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkdatabox-list
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]