|
From: Ethan M. <eam...@gm...> - 2017-10-27 22:50:58
|
This could maybe serve as a starting point. The placement is not pretty
but it shows the basic principle.
plot $Data u 2 ti col , '' u 3:key(1) ti col, \
ysum=0 '' skip 1 using (0):((ysum = ysum + $2, ysum-5)):2 with labels
notitle, \
ysum=0 '' skip 1 using (1):((ysum = ysum + $3, ysum-5)):3 with labels
notitle
On Fri, Oct 27, 2017 at 2:24 PM, theozh <th...@gm...> wrote:
> Hi,
> Is there maybe a simple way to place the values on top of
> in a column stacked histogram?
> The following example does not place the labels at the right
> y-positions, i.e. ideally centered within the different portions.
> For this you would need to somehow sum up the previous values. I do not
> see how...
> Any hints are appreciated!
> Theo.
>
> ###### gnuplot code start
> reset
> $Data <<EOD
> XXX Header1 Header2
> one 10 50
> two 20 30
> three 30 15
> four 40 5
> EOD
>
> set style data histogram
> set style histogram columnstacked
> set style fill solid border -1
> set boxwidth 0.75
>
> plot $Data u 2 ti col , '' u 3:key(1) ti col, \
> '' u (0):2:2 with labels notitle, '' u (1):3:2 with labels notitle
>
> ###### gnuplot code end
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via: https://lists.sourceforge.net/
> lists/listinfo/gnuplot-info
>
|