From lm317t@gmail.com Fri Oct 5 09:14:56 2007 Return-Path: X-Original-To: gtkdatabox-list@gnome.org Delivered-To: gtkdatabox-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 00A6C3B00DB for ; Fri, 5 Oct 2007 09:14:56 -0400 (EDT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Score: -0.185 X-Spam-Level: X-Spam-Status: No, score=-0.185 tagged_above=-999 required=2 tests=[BAYES_40=-0.185, HTML_MESSAGE=0.001, SPF_PASS=-0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 8990 hrs), (distance 12, link: (Google 2)), [64.233.162.233] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HoS5Hi+XgRbA for ; Fri, 5 Oct 2007 09:14:53 -0400 (EDT) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.233]) by menubar.gnome.org (Postfix) with ESMTP id 7E1F83B01A3 for ; Fri, 5 Oct 2007 09:14:53 -0400 (EDT) Received: by nz-out-0506.google.com with SMTP id i11so414067nzh for ; Fri, 05 Oct 2007 06:14:51 -0700 (PDT) Received: by 10.142.100.1 with SMTP id x1mr2519479wfb.1191590090733; Fri, 05 Oct 2007 06:14:50 -0700 (PDT) Received: by 10.143.161.18 with HTTP; Fri, 5 Oct 2007 06:14:50 -0700 (PDT) Message-ID: Date: Fri, 5 Oct 2007 09:14:50 -0400 From: "Brian Phelps" To: gtkdatabox-list@gnome.org Subject: logarithmic axis/grids MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_28951_19634046.1191590090729" X-BeenThere: gtkdatabox-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: General discussion of GtkDatabox List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2007 13:14:56 -0000 ------=_Part_28951_19634046.1191590090729 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_28951_19634046.1191590090729 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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
------=_Part_28951_19634046.1191590090729-- From lm317t@gmail.com Fri Oct 5 09:14:56 2007 Return-Path: X-Original-To: gtkdatabox-list@gnome.org Delivered-To: gtkdatabox-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 00A6C3B00DB for ; Fri, 5 Oct 2007 09:14:56 -0400 (EDT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Score: -0.185 X-Spam-Level: X-Spam-Status: No, score=-0.185 tagged_above=-999 required=2 tests=[BAYES_40=-0.185, HTML_MESSAGE=0.001, SPF_PASS=-0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 8990 hrs), (distance 12, link: (Google 2)), [64.233.162.233] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HoS5Hi+XgRbA for ; Fri, 5 Oct 2007 09:14:53 -0400 (EDT) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.233]) by menubar.gnome.org (Postfix) with ESMTP id 7E1F83B01A3 for ; Fri, 5 Oct 2007 09:14:53 -0400 (EDT) Received: by nz-out-0506.google.com with SMTP id i11so414067nzh for ; Fri, 05 Oct 2007 06:14:51 -0700 (PDT) Received: by 10.142.100.1 with SMTP id x1mr2519479wfb.1191590090733; Fri, 05 Oct 2007 06:14:50 -0700 (PDT) Received: by 10.143.161.18 with HTTP; Fri, 5 Oct 2007 06:14:50 -0700 (PDT) Message-ID: Date: Fri, 5 Oct 2007 09:14:50 -0400 From: "Brian Phelps" To: gtkdatabox-list@gnome.org Subject: logarithmic axis/grids MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_28951_19634046.1191590090729" X-BeenThere: gtkdatabox-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: General discussion of GtkDatabox List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2007 13:14:56 -0000 ------=_Part_28951_19634046.1191590090729 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_28951_19634046.1191590090729 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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
------=_Part_28951_19634046.1191590090729-- From box2OO6@eudoxos.de Tue Oct 16 05:28:43 2007 Return-Path: X-Original-To: gtkdatabox-list@gnome.org Delivered-To: gtkdatabox-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C6B963B005E for ; Tue, 16 Oct 2007 05:28:43 -0400 (EDT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Score: -0.51 X-Spam-Level: X-Spam-Status: No, score=-0.51 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, SPF_HELO_PASS=-0.001, TW_GT=0.077, TW_NX=0.077, TW_TK=0.077] X-Amavis-OS-Fingerprint: Linux 2.6? (barebone, rare!), (distance 20, link: ethernet/modem), [212.227.126.177] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HVMeFrBNZezM for ; Tue, 16 Oct 2007 05:28:42 -0400 (EDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by menubar.gnome.org (Postfix) with ESMTP id E7E253B0011 for ; Tue, 16 Oct 2007 05:28:41 -0400 (EDT) Received: from [82.135.79.215] (ppp-82-135-79-215.dynamic.mnet-online.de [82.135.79.215]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1Ihij90Jex-0003bw; Tue, 16 Oct 2007 11:28:39 +0200 Message-ID: <4714845F.4040409@eudoxos.de> Date: Tue, 16 Oct 2007 11:29:03 +0200 From: Roland Bock User-Agent: Thunderbird 1.5.0.13 (X11/20070824) MIME-Version: 1.0 To: gtkdatabox-list@gnome.org Subject: Re: logarithmic axis/grids References: In-Reply-To: X-Enigmail-Version: 0.94.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+mvel4XgEi9AjQzSz3uuBZ3lJigp59kIIiKZM C0JDywwEdJWOljhV9ySJBDqn5U3PBDr4qDbbObBxj/HrzbFdhQ XIZENJJxVEkuQLEqQ3ozg== X-BeenThere: gtkdatabox-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: General discussion of GtkDatabox List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2007 09:28:44 -0000 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 From laurent.perez@unicaen.fr Tue Oct 16 12:07:57 2007 Return-Path: X-Original-To: gtkdatabox-list@gnome.org Delivered-To: gtkdatabox-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 7CCDA3B0212 for ; Tue, 16 Oct 2007 12:07:57 -0400 (EDT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Score: -1.111 X-Spam-Level: X-Spam-Status: No, score=-1.111 tagged_above=-999 required=2 tests=[BAYES_05=-1.11, SPF_PASS=-0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 3615 hrs), (distance 22, link: GPRS, T1, FreeS/WAN), [193.55.130.147] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FV3xNOm1xX-6 for ; Tue, 16 Oct 2007 12:07:55 -0400 (EDT) Received: from sizun.unicaen.fr (sizun.unicaen.fr [193.55.130.147]) by menubar.gnome.org (Postfix) with ESMTP id 414043B0011 for ; Tue, 16 Oct 2007 12:07:54 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by sizun.unicaen.fr (Postfix) with ESMTP id B67CD384006 for ; Tue, 16 Oct 2007 18:07:52 +0200 (CEST) X-Virus-Scanned: by amavisd-new at unicaen.fr Received: from localhost (m2c51.geos.local [10.24.0.51]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sizun.unicaen.fr (Postfix) with ESMTP id 99FB7384003 for ; Tue, 16 Oct 2007 18:07:52 +0200 (CEST) Date: Tue, 16 Oct 2007 18:10:24 +0200 From: Laurent Perez To: gtkdatabox-list@gnome.org Subject: Re: logarithmic axis/grids Message-ID: <20071016161024.GA17357@unicaen.fr> Mail-Followup-To: Laurent Perez , gtkdatabox-list@gnome.org References: <4714845F.4040409@eudoxos.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4714845F.4040409@eudoxos.de> User-Agent: Mutt/1.4.2.1i X-BeenThere: gtkdatabox-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: General discussion of GtkDatabox List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2007 16:07:57 -0000 Hello ; According to Gtk documentation, GtkRuler is considered too specialized and will eventually be removed from Gtk. NxpRuler seems to be what GtkDatabox lacks to be the perfect widget we need. I've created 2 packages from Fabian's cournol [1] that can be found here [2] : - NxpRuler ; - modified version of GtkDatabox to use NxpRuler. I wrote a small example (ex-1.c in examples dir) but unfortunately I didn't succeed in : - making changes on the ruler to change accordingly the graph ; - using ruler log mode. As far as I can see, cournol didn't use the modified version of GtkDatabox. So, Fabian, am I doing something wrong ? Thanks. Laurent. References : ŻŻŻŻŻŻŻŻŻŻŻŻ [1] http://cournol.k-2007.de [2] http://laurent.perez2.free.fr/download/gtk From fabian.foerg@gmx.de Tue Oct 16 13:10:13 2007 Return-Path: X-Original-To: gtkdatabox-list@gnome.org Delivered-To: gtkdatabox-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 932E13B015A for ; Tue, 16 Oct 2007 13:10:13 -0400 (EDT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Score: -2.308 X-Spam-Level: X-Spam-Status: No, score=-2.308 tagged_above=-999 required=2 tests=[AWL=0.061, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077, TW_NX=0.077, TW_TK=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 3005 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 36LP+P4d6riX for ; Tue, 16 Oct 2007 13:10:12 -0400 (EDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 9B6D23B00A7 for ; Tue, 16 Oct 2007 13:10:11 -0400 (EDT) Received: (qmail invoked by alias); 16 Oct 2007 17:10:09 -0000 Received: from W19b1.w.pppool.de (EHLO [192.168.10.3]) [89.58.25.177] by mail.gmx.net (mp010) with SMTP; 16 Oct 2007 19:10:09 +0200 X-Authenticated: #2769198 X-Provags-ID: V01U2FsdGVkX1+SYCZZxCOSMDuDAqxxwPw3Q5F3zcajBaSIk9Q0Ew kr23rllJICKsuY Message-ID: <4714F08F.60700@gmx.de> Date: Tue, 16 Oct 2007 19:10:39 +0200 From: Fabian Foerg User-Agent: Thunderbird 1.5.0.13 (X11/20070824) MIME-Version: 1.0 To: gtkdatabox-list@gnome.org Subject: Re: logarithmic axis/grids References: <4714845F.4040409@eudoxos.de> In-Reply-To: <4714845F.4040409@eudoxos.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtkdatabox-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: General discussion of GtkDatabox List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2007 17:10:13 -0000 Roland Bock wrote: > 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 > > > Yes, with the nxpruler library from gnumexp-0.11.0 (http://numexp.org/) you can create logarithmic scale rulers. My program cournol (http://cournol.k-2007.de/) uses a modified version of gtkdatabox which makes use of these nxprulers. The patch which adds nxpruler support to gtkdatabox is in the cournol sources under patches/gtkdatabox.diff. The nxpruler library is also in the cournol sources under lib/nxpruler. In cournol, the nxprulers are not set to logarithmic mode. To get the logarithmic mode you would add the line "nxp_ruler_set_mode(NXP_RULER(ruler), NXP_RULER_LOG);" where it is appropriate. Look at lib/nxpruler/test.c in gnumexp for examples! Greets, Fabian From fabian.foerg@gmx.de Tue Oct 16 15:37:03 2007 Return-Path: X-Original-To: gtkdatabox-list@gnome.org Delivered-To: gtkdatabox-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6D55A3B00B7 for ; Tue, 16 Oct 2007 15:37:03 -0400 (EDT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Score: -2.314 X-Spam-Level: X-Spam-Status: No, score=-2.314 tagged_above=-999 required=2 tests=[AWL=0.055, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077, TW_NX=0.077, TW_TK=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 338 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aCGL0xwRYvpK for ; Tue, 16 Oct 2007 15:37:01 -0400 (EDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 1C8343B009A for ; Tue, 16 Oct 2007 15:37:00 -0400 (EDT) Received: (qmail invoked by alias); 16 Oct 2007 19:36:57 -0000 Received: from W19b1.w.pppool.de (EHLO [192.168.10.3]) [89.58.25.177] by mail.gmx.net (mp005) with SMTP; 16 Oct 2007 21:36:57 +0200 X-Authenticated: #2769198 X-Provags-ID: V01U2FsdGVkX1+2ptBITNe2FpNFJhq9fbBvUHZtyz8kRyW6cI6BBF nZDu5+HJC8y0H0 Message-ID: <471512F6.9030208@gmx.de> Date: Tue, 16 Oct 2007 21:37:26 +0200 From: Fabian Foerg User-Agent: Thunderbird 1.5.0.13 (X11/20070824) MIME-Version: 1.0 To: Laurent Perez , gtkdatabox-list@gnome.org, gustavo@users.sourceforge.net Subject: Re: logarithmic axis/grids References: <4714845F.4040409@eudoxos.de> <20071016161024.GA17357@unicaen.fr> In-Reply-To: <20071016161024.GA17357@unicaen.fr> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-BeenThere: gtkdatabox-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: General discussion of GtkDatabox List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2007 19:37:03 -0000 Laurent Perez wrote: > Hello ; > > According to Gtk documentation, GtkRuler is considered too specialized > and will eventually be removed from Gtk. NxpRuler seems to be what > GtkDatabox lacks to be the perfect widget we need. > > I've created 2 packages from Fabian's cournol [1] that can be found here > [2] : > - NxpRuler ; > - modified version of GtkDatabox to use NxpRuler. > > I wrote a small example (ex-1.c in examples dir) but unfortunately I > didn't succeed in : > - making changes on the ruler to change accordingly the graph ; > - using ruler log mode. > > As far as I can see, cournol didn't use the modified version of > GtkDatabox. So, Fabian, am I doing something wrong ? > > Thanks. > > > Laurent. > > > > References : > ŻŻŻŻŻŻŻŻŻŻŻŻ > [1] http://cournol.k-2007.de > [2] http://laurent.perez2.free.fr/download/gtk > _______________________________________________ > gtkdatabox-list mailing list > gtkdatabox-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtkdatabox-list > Cournol uses the modified version of gtkdatabox, i. e. the rulers from counrol are nxprulers not gtk rulers. The modification patch is under patches/gtkdatabox.diff in the cournol source archive. Cournol does not use logarithmic scales, though. You can easily replace the linear scale with a logarithmic one by adding the line "nxp_ruler_set_mode(NXP_RULER(ruler), NXP_RULER_LOG);" after the initialization of "ruler". Your ex-1.c looks like lib/nxpruler/test.c from the gnumexp sources. So actually it should work. > I wrote a small example (ex-1.c in examples dir) but unfortunately I > didn't succeed in : > - making changes on the ruler to change accordingly the graph ; What do you mean? In ex-1.c no graph, only a drawing area is drawn. Here, the scales change appropriately when you resize the window. For changing the range of the scale, you would write, for example: "nxp_ruler_adjustment_set_range(nxp_ruler_get_adjustment(NXP_RULER(vruler)), 0, 10);". This changes the scale range from 0 to 10. While testing the logarithmic scale, I encountered a problem. ---snip--- nxp_ruler_set_mode(NXP_RULER(vruler), NXP_RULER_LOG); nxp_ruler_adjustment_set_range(nxp_ruler_get_adjustment(NXP_RULER(vruler)), x, y); ---snip--- This code sets a scale range from 10^x to 10^y for vruler. Actually, I had expected a scale from x to y which gets logarithmically "denser" (or "wider", respectively) from one side to the other side. Maybe I totally misunderstood the concept. Gustavo, any ideas? Greets, Fabian From box2OO6@eudoxos.de Tue Oct 16 18:19:36 2007 Return-Path: X-Original-To: gtkdatabox-list@gnome.org Delivered-To: gtkdatabox-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2A1B03B010E for ; Tue, 16 Oct 2007 18:19:36 -0400 (EDT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Score: -2.523 X-Spam-Level: X-Spam-Status: No, score=-2.523 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, SPF_HELO_PASS=-0.001, TW_NX=0.077] X-Amavis-OS-Fingerprint: Linux 2.6? (barebone, rare!), (distance 20, link: ethernet/modem), [212.227.126.187] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1wwot82kNghG for ; Tue, 16 Oct 2007 18:19:34 -0400 (EDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by menubar.gnome.org (Postfix) with ESMTP id DCF953B00C9 for ; Tue, 16 Oct 2007 18:19:33 -0400 (EDT) Received: from [82.135.79.215] (ppp-82-135-79-215.dynamic.mnet-online.de [82.135.79.215]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1Ihul81lNS-00084R; Wed, 17 Oct 2007 00:19:31 +0200 Message-ID: <4715390F.9060100@eudoxos.de> Date: Wed, 17 Oct 2007 00:19:59 +0200 From: Roland Bock User-Agent: Thunderbird 1.5.0.13 (X11/20070824) MIME-Version: 1.0 To: gtkdatabox-list@gnome.org Subject: Very first version with logarithmic scales X-Enigmail-Version: 0.94.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+apYfjRqi5hxz0SjOD3OYiRZgfEVb9RJ51BjE a6XSk0PKvX8QejJqk6PgDBvI5gnAAZ59uRi3o/XUpbY71jamLj 6XTb6hnhSNOvfqnl+pe+g== X-BeenThere: gtkdatabox-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: General discussion of GtkDatabox List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2007 22:19:36 -0000 Hello everyone, introducing logarithmic scales proved to be more time consuming than I thought, but now I have uploaded a very first version for review: http://www.eudoxos.net/gtk/gtkdatabox/download/gtkdatabox-0.8-alpha.0.0.tar.gz The code supports both, linear and logarithmic scales. As of now, the scaling method has to be chosen at compile time of the library (this will have to change, of course). You can change the scaling method in the file gtk/gtkdatabox_canvas.c, line 151. A new example has been added, to show how logarithmic scales work (examples/logarithmic). It shows a 10^x and a sinus (shifted to positiv values). If the library is unchanged, the X axis will be linear and the Y axis will be logarithmic. The other examples probably look awful, especially if negative Y values are present (which is kind of uncool for logarithms...). Of course, this is not completed yet, but it shows the direction of where I want to go. Any feedback is welcome :-) Regards, Roland PS: I don't think I will be able to work much on this again before Monday. PPS: The nxprulers seem to be the way to go. Thanks for the comments. A patch for the alpha version would be nice. It should be working with the logarithmic example, of course :-) From laurent.perez@unicaen.fr Wed Oct 17 05:37:25 2007 Return-Path: X-Original-To: gtkdatabox-list@gnome.org Delivered-To: gtkdatabox-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4CFF13B00E8 for ; Wed, 17 Oct 2007 05:37:25 -0400 (EDT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Score: -2.369 X-Spam-Level: X-Spam-Status: No, score=-2.369 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077, TW_NX=0.077, TW_TK=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 3659 hrs), (distance 22, link: GPRS, T1, FreeS/WAN), [193.55.130.147] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tPdLahbrf8qn for ; Wed, 17 Oct 2007 05:37:23 -0400 (EDT) Received: from sizun.unicaen.fr (sizun.unicaen.fr [193.55.130.147]) by menubar.gnome.org (Postfix) with ESMTP id 71A593B00C5 for ; Wed, 17 Oct 2007 05:37:23 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by sizun.unicaen.fr (Postfix) with ESMTP id 5927D38400C for ; Wed, 17 Oct 2007 11:37:21 +0200 (CEST) X-Virus-Scanned: by amavisd-new at unicaen.fr Received: from localhost (m2c51.geos.local [10.24.0.51]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sizun.unicaen.fr (Postfix) with ESMTP id 2245E384006 for ; Wed, 17 Oct 2007 11:37:18 +0200 (CEST) Date: Wed, 17 Oct 2007 11:39:51 +0200 From: Laurent Perez To: gtkdatabox-list@gnome.org Subject: Re: logarithmic axis/grids Message-ID: <20071017093951.GA2496@unicaen.fr> Mail-Followup-To: Laurent Perez , gtkdatabox-list@gnome.org References: <4714845F.4040409@eudoxos.de> <4714F08F.60700@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="9zSXsLTf0vkW971A" Content-Disposition: inline In-Reply-To: <4714F08F.60700@gmx.de> User-Agent: Mutt/1.4.2.1i X-BeenThere: gtkdatabox-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: General discussion of GtkDatabox List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2007 09:37:25 -0000 --9zSXsLTf0vkW971A Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, > Cournol uses the modified version of gtkdatabox, i. e. the rulers from > counrol are nxprulers not gtk rulers. The modification patch is under > patches/gtkdatabox.diff in the cournol source archive. Moving the mouse pointer over rulers in cournol doesn't highlight them, so I was assuming you didn't use nxpruler. Looking in nxpgtkdatabox code I can see that rulers are made inactive. Sorry. > What do you mean? In ex-1.c no graph, only a drawing area is drawn. ex-1.c from nxpruler-0.1.tar.bz2 package is basically test.c from gnumexp renamed. I don't like naming a program "test" for it's a shell command. There another example named ex-1.c (ok, it's not very clever ;^)) in the patched gtkdatabox package I put on my homesite. I'am having the same strange behavior than Fabian. I'am trying to plot log10(x) from 1 to 1e5. If I call gtk_databox_auto_rescale (), nxpruler is passed a 0 to 1e5 range and scale himself from 1 to 10^(1e5). I attached this example. Regards ; Laurent. --9zSXsLTf0vkW971A Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ex-1.c" #include #include #include #include #include #include #define POINTS 100000 static void create (void) { GtkWidget *window, *table, *vbox, *box, *hruler, *vruler; GtkDataboxGraph *graph; GtkDataboxValue min, max; gfloat *X, *Y; GdkColor color; gint i; NxpRulerAdjustment *hadj, *vadj; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request (window, 600, 400); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), vbox); table = gtk_table_new (2, 2, FALSE); box = gtk_databox_new (); gtk_table_attach (GTK_TABLE (table), box, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND | GTK_SHRINK, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 0); hadj = nxp_ruler_adjustment_new (0, 5); vadj = nxp_ruler_adjustment_new (0, 5); hruler = nxp_hruler_new (hadj); nxp_ruler_set_mode (NXP_RULER (hruler), NXP_RULER_LOG); gtk_table_attach (GTK_TABLE (table), hruler, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND | GTK_SHRINK, GTK_FILL, 0, 0); gtk_databox_set_hruler (GTK_DATABOX (box), NXP_RULER (hruler)); vruler = nxp_vruler_new (vadj); /* nxp_ruler_set_mode (NXP_RULER (vruler), NXP_RULER_LOG); */ gtk_table_attach (GTK_TABLE (table), vruler, 0, 1, 0, 1, GTK_FILL, GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 0); gtk_databox_set_vruler (GTK_DATABOX (box), NXP_RULER (vruler)); gtk_box_pack_start (GTK_BOX (vbox), table, TRUE, TRUE, 0); g_object_unref (hadj); g_object_unref (vadj); X = g_new0 (gfloat, POINTS); Y = g_new0 (gfloat, POINTS); for (i = 1 ; i < POINTS + 1; i ++) { X [i] = i; Y [i] = log10 (i); } color.red = 0; color.green = 65535; color.blue = 0; graph = gtk_databox_lines_new (POINTS, X, Y, &color, 1); gtk_databox_graph_add (GTK_DATABOX (box), graph); gtk_databox_auto_rescale (GTK_DATABOX (box), 0); /* min.x = 0; */ /* max.x = 1e5; */ /* min.y = 0; */ /* max.y = 5; */ /* gtk_databox_set_canvas (GTK_DATABOX (box), min, max); */ gtk_databox_get_canvas (GTK_DATABOX (box), &min, &max); printf ("x = (%f, %f)\n", min.x, max.x); printf ("y = (%f, %f)\n", min.y, max.y); g_signal_connect (GTK_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), NULL); gtk_widget_show_all (window); gdk_window_set_cursor (box->window, gdk_cursor_new (GDK_CROSS)); } gint main (gint argc, char *argv[]) { gtk_init (&argc, &argv); create (); gtk_main (); return 0; } --9zSXsLTf0vkW971A--