[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Stacked bar plot legend reversed
From: |
Shaun Jackman |
Subject: |
Stacked bar plot legend reversed |
Date: |
Wed, 4 Jan 2012 12:45:57 -0800 |
Hi,
When drawing a stacked bar plot with a legend, the data is drawn from
bottom to top, whereas the legend is drawn from top to bottom, which
isn't exactly intuitive. Is there any way to reverse the order of the
legend?
For example, the following snippet draws the Oranges data stacked on top
of Apples, but the legend will read from top to bottom Apples and then
Oranges:
h = [1 2; 3 4]
bar(h, 'stacked')
legend('Apples', 'Oranges')
Thanks,
Shaun
- Stacked bar plot legend reversed,
Shaun Jackman <=