caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] plot library
@ 2011-08-30 23:26 Yoann Padioleau
  2011-08-30 23:46 ` Guillaume Yziquel
  0 siblings, 1 reply; 14+ messages in thread
From: Yoann Padioleau @ 2011-08-30 23:26 UTC (permalink / raw)
  To: caml users

Hi,

I have a simple dataset that I would like to plot.
My file contains:
Food 	2000 	2001 	2002 	2003
Banana 	4 	5 	5 	2
Lemon 	1 	2 	3 	4
Orange 	2 	2 	1 	3

and I want to display on the same plot the evolution of the food with some automatic
colors assigned to each food and automatic labeling. 

What do we have in ocaml to do that? plplot is the best library?





^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Caml-list] plot library
  2011-08-30 23:26 [Caml-list] plot library Yoann Padioleau
@ 2011-08-30 23:46 ` Guillaume Yziquel
  2011-08-31  2:42   ` Pierre Hauweele
  0 siblings, 1 reply; 14+ messages in thread
From: Guillaume Yziquel @ 2011-08-30 23:46 UTC (permalink / raw)
  To: Yoann Padioleau; +Cc: caml users

Le Tuesday 30 Aug 2011 à 23:26:39 (+0000), Yoann Padioleau a écrit :
> Hi,
> 
> I have a simple dataset that I would like to plot.
> My file contains:
> Food 	2000 	2001 	2002 	2003
> Banana 	4 	5 	5 	2
> Lemon 	1 	2 	3 	4
> Orange 	2 	2 	1 	3
> 
> and I want to display on the same plot the evolution of the food with some automatic
> colors assigned to each food and automatic labeling. 
> 
> What do we have in ocaml to do that? plplot is the best library?

I've heard good things about Archimedes, though I never tried it.

	https://forge.ocamlcore.org/projects/archimedes/

-- 
     Guillaume Yziquel


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Caml-list] plot library
  2011-08-30 23:46 ` Guillaume Yziquel
@ 2011-08-31  2:42   ` Pierre Hauweele
  2011-08-31  3:35     ` Yoann Padioleau
  0 siblings, 1 reply; 14+ messages in thread
From: Pierre Hauweele @ 2011-08-31  2:42 UTC (permalink / raw)
  To: Guillaume Yziquel; +Cc: Yoann Padioleau, caml users

Hello,

On Wed, Aug 31, 2011 at 1:46 AM, Guillaume Yziquel
<guillaume.yziquel@citycable.ch> wrote:
> I've heard good things about Archimedes, though I never tried it.

Happy to hear that, but please note that Archimedes is still in development.
Automatic color selection and labelling are not yet implemented, but
you're free to give a helping hand.

Pierre Hauweele

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Caml-list] plot library
  2011-08-31  2:42   ` Pierre Hauweele
@ 2011-08-31  3:35     ` Yoann Padioleau
  2011-08-31  4:01       ` Yoann Padioleau
  0 siblings, 1 reply; 14+ messages in thread
From: Yoann Padioleau @ 2011-08-31  3:35 UTC (permalink / raw)
  To: Pierre Hauweele; +Cc: Guillaume Yziquel, caml users


On Aug 30, 2011, at 7:42 PM, Pierre Hauweele wrote:

> Hello,
> 
> On Wed, Aug 31, 2011 at 1:46 AM, Guillaume Yziquel
> <guillaume.yziquel@citycable.ch> wrote:
>> I've heard good things about Archimedes, though I never tried it.
> 
> Happy to hear that, but please note that Archimedes is still in development.
> Automatic color selection and labelling are not yet implemented, but
> you're free to give a helping hand.

Just installed it. Works fine. But I could not find a way to draw the legend
and label manually things.

For instance on 
Food 	2000 	2001 	2002 	2003
Banana 	4 	5 	5 	2
Lemon 	1 	2 	3 	4
Orange 	2 	2 	1 	3

What would be the call to Archimedes.stack ... 
to get the stacked bars with the right labeling and not too bad color (let's say red/green/blue for banana/lemon/orange).


> 
> Pierre Hauweele



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Caml-list] plot library
  2011-08-31  3:35     ` Yoann Padioleau
@ 2011-08-31  4:01       ` Yoann Padioleau
  2011-09-01 20:37         ` Pierre Hauweele
  0 siblings, 1 reply; 14+ messages in thread
From: Yoann Padioleau @ 2011-08-31  4:01 UTC (permalink / raw)
  To: Yoann Padioleau; +Cc: Pierre Hauweele, Guillaume Yziquel, caml users

Also is there a function to display stacked graphs, as in many-eyes:
http://www-958.ibm.com/software/data/cognos/manyeyes/page/Stack_Graph_for_Categories.html


On Aug 30, 2011, at 8:35 PM, Yoann Padioleau wrote:

> 
> On Aug 30, 2011, at 7:42 PM, Pierre Hauweele wrote:
> 
>> Hello,
>> 
>> On Wed, Aug 31, 2011 at 1:46 AM, Guillaume Yziquel
>> <guillaume.yziquel@citycable.ch> wrote:
>>> I've heard good things about Archimedes, though I never tried it.
>> 
>> Happy to hear that, but please note that Archimedes is still in development.
>> Automatic color selection and labelling are not yet implemented, but
>> you're free to give a helping hand.
> 
> Just installed it. Works fine. But I could not find a way to draw the legend
> and label manually things.
> 
> For instance on 
> Food 	2000 	2001 	2002 	2003
> Banana 	4 	5 	5 	2
> Lemon 	1 	2 	3 	4
> Orange 	2 	2 	1 	3
> 
> What would be the call to Archimedes.stack ... 
> to get the stacked bars with the right labeling and not too bad color (let's say red/green/blue for banana/lemon/orange).
> 
> 
>> 
>> Pierre Hauweele
> 



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Caml-list] plot library
  2011-08-31  4:01       ` Yoann Padioleau
@ 2011-09-01 20:37         ` Pierre Hauweele
  2011-09-03  5:49           ` Yoann Padioleau
  0 siblings, 1 reply; 14+ messages in thread
From: Pierre Hauweele @ 2011-09-01 20:37 UTC (permalink / raw)
  To: Yoann Padioleau; +Cc: Guillaume Yziquel, caml users

Hello,

On Wed, Aug 31, 2011 at 6:01 AM, Yoann Padioleau <padator@wanadoo.fr> wrote:
> Also is there a function to display stacked graphs, as in many-eyes:
> http://www-958.ibm.com/software/data/cognos/manyeyes/page/Stack_Graph_for_Categories.html
> On Aug 30, 2011, at 8:35 PM, Yoann Padioleau wrote:
>>
>> Just installed it. Works fine. But I could not find a way to draw the legend
>> and label manually things.

I'm sorry, when I said labels weren't implemented yet, I meant the legend.
You may find an example use of labels in the "Text_labels" test.

You can place the legend manually using Viewport.text using the `Graph
or `Device coordinates (normalized coordinates of resp. the graph window
and the viewport) and playing with paths for making your legend box.
For example, you can place the text with:
  Viewport.text vp ~coord:`Graph 1. 1. ~pos:Backend.LB "Banana";

>> For instance on
>> Food  2000    2001    2002    2003
>> Banana        4       5       5       2
>> Lemon         1       2       3       4
>> Orange        2       2       1       3
>>
>> What would be the call to Archimedes.stack ...
>> to get the stacked bars with the right labeling and not too bad color (let's say red/green/blue for banana/lemon/orange).

I invite you to check the latest bazaar trunk and take a look at the
test "Plot_stack" where you set the style to `Lines with :
  A.Array.stack vp ~style:`Lines data;
If the predefined colors doesn't suit your needs, you can specify your
own array of colors via the ?fillcolors optional.

If you have further specific questions on the use of Archimedes, I
invite you to discuss them offlist.

Thank you for your interest in Archimedes,
Pierre Hauweele


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Caml-list] plot library
  2011-09-01 20:37         ` Pierre Hauweele
@ 2011-09-03  5:49           ` Yoann Padioleau
  0 siblings, 0 replies; 14+ messages in thread
From: Yoann Padioleau @ 2011-09-03  5:49 UTC (permalink / raw)
  To: Pierre Hauweele; +Cc: Guillaume Yziquel, caml users

> 
> I invite you to check the latest bazaar trunk and take a look at the

on my mac:
$ bzr checkout https://forge.ocamlcore.org/anonscm/bzr/archimedes/
bzr: ERROR: Connection error: curl connection error (SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed)
on https://forge.ocamlcore.org/anonscm/bzr/archimedes/.bzr/smart 

I thought anonymous access to the repo would not require some certificates ...

removing https does not help:
$ bzr checkout http://forge.ocamlcore.org/anonscm/bzr/archimedes/
bzr: ERROR: Not a branch: "http://forge.ocamlcore.org/anonscm/bzr/archimedes/.bzr/branch/": location is a repository.


> test "Plot_stack" where you set the style to `Lines with :
>  A.Array.stack vp ~style:`Lines data;
> If the predefined colors doesn't suit your needs, you can specify your
> own array of colors via the ?fillcolors optional.
> 
> If you have further specific questions on the use of Archimedes, I
> invite you to discuss them offlist.
> 
> Thank you for your interest in Archimedes,
> Pierre Hauweele



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Caml-list] Plot library
  2005-08-09 18:06 Plot library romildo
  2005-08-09 18:26 ` [Caml-list] " Chris King
@ 2005-08-11 19:18 ` Jon Harrop
  1 sibling, 0 replies; 14+ messages in thread
From: Jon Harrop @ 2005-08-11 19:18 UTC (permalink / raw)
  To: caml-list

On Tuesday 09 August 2005 19:06, romildo@uber.com.br wrote:
> If not, how are graphics plotted in OCaml and lablgtk?

We do all of our graphics using OpenGL (via the excellent lablgl).

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Caml-list] Plot library
  2005-08-10 11:16         ` Richard Jones
@ 2005-08-10 20:42           ` Ken Rose
  0 siblings, 0 replies; 14+ messages in thread
From: Ken Rose @ 2005-08-10 20:42 UTC (permalink / raw)
  To: caml-list

Richard Jones wrote:
> On Tue, Aug 09, 2005 at 06:30:29PM -0400, Chris King wrote:
> 
>>On 8/9/05, Ken Rose <kenrose@tfb.com> wrote:
>>
>>>And can you print it?
>>
>>No.  This is one area in which the Gnome Canvas is actually inferior
>>to the Tk canvas widget.
> 
> 
> I have some code which allows you to print the Gtk drawing area under
> Windows.  It's very hacky - basically it is possible to get a bitmap
> of the drawing area, which is then written out as a PPM file, which is
> then piped into a separate "winprint" program which I derived from the
> guts of the GIMP printer driver for Windows.  Anyway, let me know if
> you want it.

I'd like to see it.  Perhaps it's something for the humps?

  - ken


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Caml-list] Plot library
  2005-08-09 22:30       ` Chris King
@ 2005-08-10 11:16         ` Richard Jones
  2005-08-10 20:42           ` Ken Rose
  0 siblings, 1 reply; 14+ messages in thread
From: Richard Jones @ 2005-08-10 11:16 UTC (permalink / raw)
  To: Chris King; +Cc: rose, caml-list

On Tue, Aug 09, 2005 at 06:30:29PM -0400, Chris King wrote:
> On 8/9/05, Ken Rose <kenrose@tfb.com> wrote:
> > 
> > And can you print it?
> 
> No.  This is one area in which the Gnome Canvas is actually inferior
> to the Tk canvas widget.

I have some code which allows you to print the Gtk drawing area under
Windows.  It's very hacky - basically it is possible to get a bitmap
of the drawing area, which is then written out as a PPM file, which is
then piped into a separate "winprint" program which I derived from the
guts of the GIMP printer driver for Windows.  Anyway, let me know if
you want it.

Rich.

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Caml-list] Plot library
  2005-08-09 20:22     ` Ken Rose
@ 2005-08-09 22:30       ` Chris King
  2005-08-10 11:16         ` Richard Jones
  0 siblings, 1 reply; 14+ messages in thread
From: Chris King @ 2005-08-09 22:30 UTC (permalink / raw)
  To: rose; +Cc: caml-list

romildo@uber.com.br wrote:
> Does it work in Windows too?

It doesn't seem to be included in the Win32 distribution of LablGTK2,
but if you're using Cygwin then I presume it will compile given the
right libraries.

On 8/9/05, Ken Rose <kenrose@tfb.com> wrote:
> 
> And can you print it?

No.  This is one area in which the Gnome Canvas is actually inferior
to the Tk canvas widget.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Caml-list] Plot library
  2005-08-09 19:40   ` romildo
@ 2005-08-09 20:22     ` Ken Rose
  2005-08-09 22:30       ` Chris King
  0 siblings, 1 reply; 14+ messages in thread
From: Ken Rose @ 2005-08-09 20:22 UTC (permalink / raw)
  To: caml-list

romildo@uber.com.br wrote:
> On Tue, Aug 09, 2005 at 02:26:26PM -0400, Chris King wrote:
> 
>>On 8/9/05, romildo@uber.com.br <romildo@uber.com.br> wrote:
>>
>>>I am looking for an ocaml plot library that integrates
>>>well with lablgtk. Is there one?
>>
>>I've used the Gnome Canvas widget in lablgtk2 with much success.  It's
>>included with lablgtk2 in "lablgnomecanvas.cma".  It's based on Tk's
>>canvas widget but is much more powerful.  Unfortunately it's not
>>available for lablgtk, only lablgtk2.  You can find docs for it at
> 
> 
> Does it work in Windows too?

And can you print it?

  - ken


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Caml-list] Plot library
  2005-08-09 18:26 ` [Caml-list] " Chris King
@ 2005-08-09 19:40   ` romildo
  2005-08-09 20:22     ` Ken Rose
  0 siblings, 1 reply; 14+ messages in thread
From: romildo @ 2005-08-09 19:40 UTC (permalink / raw)
  To: Chris King; +Cc: caml-list

On Tue, Aug 09, 2005 at 02:26:26PM -0400, Chris King wrote:
> On 8/9/05, romildo@uber.com.br <romildo@uber.com.br> wrote:
> > I am looking for an ocaml plot library that integrates
> > well with lablgtk. Is there one?
> 
> I've used the Gnome Canvas widget in lablgtk2 with much success.  It's
> included with lablgtk2 in "lablgnomecanvas.cma".  It's based on Tk's
> canvas widget but is much more powerful.  Unfortunately it's not
> available for lablgtk, only lablgtk2.  You can find docs for it at

Does it work in Windows too?

Romildo


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Caml-list] Plot library
  2005-08-09 18:06 Plot library romildo
@ 2005-08-09 18:26 ` Chris King
  2005-08-09 19:40   ` romildo
  2005-08-11 19:18 ` Jon Harrop
  1 sibling, 1 reply; 14+ messages in thread
From: Chris King @ 2005-08-09 18:26 UTC (permalink / raw)
  To: caml-list

On 8/9/05, romildo@uber.com.br <romildo@uber.com.br> wrote:
> I am looking for an ocaml plot library that integrates
> well with lablgtk. Is there one?

I've used the Gnome Canvas widget in lablgtk2 with much success.  It's
included with lablgtk2 in "lablgnomecanvas.cma".  It's based on Tk's
canvas widget but is much more powerful.  Unfortunately it's not
available for lablgtk, only lablgtk2.  You can find docs for it at
http://compiler.kaist.ac.kr/~shoh/ocaml/lablgtk2/lablgtk-2.4.0/doc/html/GnoCanvas.html.

- Chris King


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-09-03  5:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-30 23:26 [Caml-list] plot library Yoann Padioleau
2011-08-30 23:46 ` Guillaume Yziquel
2011-08-31  2:42   ` Pierre Hauweele
2011-08-31  3:35     ` Yoann Padioleau
2011-08-31  4:01       ` Yoann Padioleau
2011-09-01 20:37         ` Pierre Hauweele
2011-09-03  5:49           ` Yoann Padioleau
  -- strict thread matches above, loose matches on Subject: below --
2005-08-09 18:06 Plot library romildo
2005-08-09 18:26 ` [Caml-list] " Chris King
2005-08-09 19:40   ` romildo
2005-08-09 20:22     ` Ken Rose
2005-08-09 22:30       ` Chris King
2005-08-10 11:16         ` Richard Jones
2005-08-10 20:42           ` Ken Rose
2005-08-11 19:18 ` Jon Harrop

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