[scilab-Users] fine bar graph formatting

Mathieu Dubois mathieu.dubois at limsi.fr
Mon Mar 5 18:16:52 CET 2012


Hello,

Just for the record I think the best way it to use graphic entities handle.

Starting from the code:

bar(y,0.5,'stacked');

One can get an handle on the polyline with:

e=gce();

And then set the properties:

e.children(2).background=3; // Green in the default CMAP

e.children(1).background=5; // Red in the default CMAP


Mathieu

On 02/29/2012 02:57 PM, David Chèze wrote:
> Hello,
>
> i would like to draw a bar graph of 'stacked' style of multiple datasets,
> controlling the colors of each stacked bar in the graph and i'm presently
> failing to do control the color (i can only control the color for the whole
> bars): thanks for your tips.
>
> here 's part of my code:
>
> y=[ya 1-ya;ym 1-ym;ys 1-ys;yd 1-yd];
> //graphe cumul : production
> //formattage
> bar(y,0.5,'stacked');
> xtitle('production');
> a=gca();
> a.x_ticks.labels=["an";"mois";"sem";"veille"];
>
> David
>
> --
> View this message in context: http://mailinglists.scilab.org/fine-bar-graph-formatting-tp3787340p3787340.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
>
> --
> To unsubscribe from this mailing-list, please send an empty mail to
> users-unsubscribe at lists.scilab.org
> To check the archives of this mailing list, see
> http://mailinglists.scilab.org/
>




More information about the users mailing list