Re: logarithmic axis/grids



Dear Brian,

thank you for the roses and sorry for letting you wait so long, but I
was in the middle of another project.

In principle, introducing logarithmic scales and grids should be fairly
easy to do: There is a struct called GtkDataboxCanvas which contains the
necessary information for positioning graph elements (dots, lines, etc)
on the screen. Up to now, the real calculation is done in the individual
graph classes, though. This calculation could be centralized (simple).
Then it would be easy to replace the linear transformation by a
logarithmic one.

Of course, similar actions are necessary for functions like
gtk_databox_value_from_coord and maybe (I haven't put too much thought
into that yet) also for scrollbars.

I am going to try to do this soon. There should be no implications for
anybody who wants to stick with the linear scales.


The rulers are different, though, because we are using the standard gtk
rulers and I don't think they can be switched to non-linear scales.
Maybe the nxpruler library suggested by Fabian can help here
(http://numexp.org)? I haven't looked into that.


Regards,

Roland



Brian Phelps wrote:
> Thank you for writing such a great library.  It would be perfect except
> I need a logarithmic axis (ruler & grids).  I am using it for a
> specialized fft application where the frequency needs to double to
> represent octaves.  I realize there are ways around this, but
> logarithmic grids and rulers would be ideal. 
> 
> My project is at http://sourceforge.net/projects/brp-pacu/ but I have
> not released any files. 
> 
> Does anyone have any suggestions?
> 
> -Brian Phelps
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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]