caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Plotting with Archimedes over Cairo and GTK
@ 2011-08-12 20:10 Adrien
  0 siblings, 0 replies; only message in thread
From: Adrien @ 2011-08-12 20:10 UTC (permalink / raw)
  To: Caml Mailing List

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-12 20:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-12 20:10 [Caml-list] Plotting with Archimedes over Cairo and GTK Adrien

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