Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Histograms

1 view
Skip to first unread message

Paolo Franchini

unread,
Oct 28, 2009, 6:28:41 AM10/28/09
to
Dear all,

I'd like to know how to build an histogram plot with a different color
for each bar. I've just one column of date: the very simple case.

Thanks guys for the help,

Paolo

Zoltan

unread,
Oct 28, 2009, 1:49:48 PM10/28/09
to
> I'd like to know how to build an histogram plot with a different color
> for each bar. I've just one column of date: the very simple case.

If I understood your question correctly, one possible solution would
be

p 'foo' u 0:1:0 w boxes fs solid 0.5 lt palette

where the colour will be determined by the value of the 0th pseudo-
column.
Change your palette, if you want to have different colours.
Cheers,
Zoltán

Paolo Franchini

unread,
Oct 29, 2009, 7:21:06 AM10/29/09
to

Thanks for the help Zoltán,

I've followed your suggestion using a defined palette
set palette defined (-10 "white", 1 "white", 1 "green", 2 "green",
3 "blu.....

and plotting in this way, otherwise I had just the contour line with
the palette colours:
plot "perc.dat" u 0:1:0 with boxes fs solid palette

cheers,

Paolo

plot "perc.dat" u 0:1:0 with boxes fs solid palette

0 new messages