Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Inverting a bar chart
Date: Wed, 28 Oct 2009 18:25:18 +0000 (UTC)
Organization: PatientsLikeMe
Lines: 13
Message-ID: <hca2ae$ogl$1@fred.mathworks.com>
References: <hca1r7$ove$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1256754318 25109 172.30.248.37 (28 Oct 2009 18:25:18 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 28 Oct 2009 18:25:18 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1841757
Xref: news.mathworks.com comp.soft-sys.matlab:580713


"Ryan Utz" <rutz@al.umces.edu> wrote in message <hca1r7$ove$1@fred.mathworks.com>...
> Hello all,
> 
> I need to make a simple (i.e. bar(x,y)) bar chart where the y-axis is inverted, in other words, bars go down instead of up (though the values are positive), so that the graph looks like columns hanging from the ceiling. Is there any way to tell Matlab to do this? Multiplying all of my y-axis values by -1 does the trick but then the y-axis is incorrectly labeled (i.e. with negative values). 
> 
> Thanks for any/all help,
> Ryan

Not sure if this is the best way, but one way is

>> set(gca,'View',[0 -90])

Normally the View property is [0 90]