caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Pierre Hauweele <pierre@hauweele.net>
To: Yoann Padioleau <padator@wanadoo.fr>
Cc: Guillaume Yziquel <guillaume.yziquel@citycable.ch>,
	caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] plot library
Date: Thu, 1 Sep 2011 22:37:00 +0200	[thread overview]
Message-ID: <CANHVmUNrKf0F=x2gkcNpEQ0tZ4aCRhhADt9pyVt3dqN-DOr0-w@mail.gmail.com> (raw)
In-Reply-To: <6CB96C5A-2C1F-43D8-A122-1DBC3159B522@wanadoo.fr>

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


  reply	other threads:[~2011-09-01 20:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30 23:26 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 [this message]
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

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='CANHVmUNrKf0F=x2gkcNpEQ0tZ4aCRhhADt9pyVt3dqN-DOr0-w@mail.gmail.com' \
    --to=pierre@hauweele.net \
    --cc=caml-list@inria.fr \
    --cc=guillaume.yziquel@citycable.ch \
    --cc=padator@wanadoo.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).