From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p7CKArOm016209 for ; Fri, 12 Aug 2011 22:10:53 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AooBAPyHRU7RVdc0kGdsb2JhbABBp3EIFAEBAQEJCQ0HFAQhgVkCLAEbHgMSEF0BEQEFASI1h1GaPYJUCow2glWFCDuIbQIDBoZBBIwmhmqMVzyDYA X-IronPort-AV: E=Sophos;i="4.67,364,1309730400"; d="scan'208";a="115723208" Received: from mail-ew0-f52.google.com ([209.85.215.52]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 12 Aug 2011 22:10:48 +0200 Received: by ewy28 with SMTP id 28so2173803ewy.39 for ; Fri, 12 Aug 2011 13:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=lG8oVwHJWISGFU6j8M0N7aaVq4gLxGdRwygyHR30O7A=; b=EjKmUGEZN7mGoLhSNudclZnHYkqoeJgJFmOcJM+aDnuMFS4GA5VTeXaOhoERYYtnka OIvQb6XxY53mNCdMwGPy/f5Ju2uYcKkOGjPmJcMFHL0WyiTXmoNx0uTap/KAqahiqO99 zRhhChsRzSCjthU1l8IFCxtBGCcEFJNxzyOH8= MIME-Version: 1.0 Received: by 10.213.19.10 with SMTP id y10mr550731eba.76.1313179846376; Fri, 12 Aug 2011 13:10:46 -0700 (PDT) Received: by 10.213.21.199 with HTTP; Fri, 12 Aug 2011 13:10:46 -0700 (PDT) Date: Fri, 12 Aug 2011 22:10:46 +0200 Message-ID: From: Adrien To: Caml Mailing List Content-Type: text/plain; charset=ISO-8859-1 Subject: [Caml-list] Plotting with Archimedes over Cairo and GTK Hi, I have to create a simple graphical interface to display big amounts of data: up to 20 plots with several millions of points each. I'm using the Archimedes library (hosted on the forge, see the "NB" at the end for the reason I'm using it). Archimedes can use Cairo2 and Cairo2 can be used in conjunction with lablgtk2. Yet, I can't get Archimedes to work with lablgtk2. First, Archimedes uses a plugin interface with dynlink and hides the actual type of the cairo object. As far as I can tell, it uses a Cairo.Surface.t. I've tried to use Obj.magic to call Cairo.Surface.flush with that cairo object but of course the program is crashing. Am I wrong on the actual type of the object? Second, I'm not sure how to use the cairo object created by archimedes with a Cairo.context create by Cairo_gtk. Do I have to use Cairo.set_source_surface? ( http://cairo.forge.ocamlcore.org/API/Cairo.html#VALset_source_surface ) Thanks, Adrien Nader NB: After looking at maybe 30 different tools and libraries in order to plot all my points quite easily, Sylvain Le Gall pointed me to Archimedes. It is the only library that has been able to handle properly this amount of points (plotting is almost instantaneous), simply because it has an API to not try to plot points uselessly: when putting 1_000_000 points on a display that is only 1_000 points-wide, most are useless and yet, most libraries don't take advantage of that. PS: I'll be at CCC near Berlin during the week-end, let me know if you are there too (and we'll get a tent dedicated to ocaml in four years!).