caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Adrien <camaradetux@gmail.com>
To: Caml Mailing List <caml-list@yquem.inria.fr>
Subject: [Caml-list] Plotting with Archimedes over Cairo and GTK
Date: Fri, 12 Aug 2011 22:10:46 +0200	[thread overview]
Message-ID: <CAP5QFJkj2MQP1=nxxzFRxc7NqU-cdGBvOJp0+2zXkRsA59w6Hg@mail.gmail.com> (raw)

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!).

                 reply	other threads:[~2011-08-12 20:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP5QFJkj2MQP1=nxxzFRxc7NqU-cdGBvOJp0+2zXkRsA59w6Hg@mail.gmail.com' \
    --to=camaradetux@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).