[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Plot divergent stacked bar chart

From: Joao Rodrigues
Subject: Plot divergent stacked bar chart
Date: Tue, 14 Apr 2015 18:17:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Dear all

I would like to know if it possible to plot a divergent stacked bar chart in Octave.

As an example consider the dataset a =  [
10    8
5    -3
-7    -1

I want to have two stacked bars, where:

the first has blue from 0 to 10, green from 10 to 15 and red from 0 to -7;

the second has blue from 0 to 8, green from 0 to -3 and red from -3 to -4.

Additionally, the net total should be displayed as a dot in positions 8 and 4, connected by a line if I so wish.

The cherry on top of the cake would be to be able to choose a divergent y-log scale too.

Is there any way to do this?

I tried bar(a','stacked') but the negative/positive values are all stacked on top of one another, overlapping the other values. (e.g., in the first row it yields blue from 0 to 8 and red from 8 to 15.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]