Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: scatterhist with axis
Date: Tue, 3 Feb 2009 16:32:01 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 24
Message-ID: <gm9ri1$7kl$1@fred.mathworks.com>
References: <65f14c0d-ecfb-445e-bfd0-8b02009abcd2@l33g2000pri.googlegroups.com> <8da1806f-a732-40ef-942f-33233c259d6a@i20g2000prf.googlegroups.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1233678721 7829 172.30.248.35 (3 Feb 2009 16:32:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 3 Feb 2009 16:32:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:515730


perfreem@gmail.com
> > one of the solutions
> > ...

> when i do this, the histogram axes appear to have the right values but
> are shown as negative numbers. any idea how to fix this...

one of the solutions

% the data
     x=5*randn(1000,1);
     y=.5*randn(1000,1);
% the plot
     lh=scatterhist(x,y);
     bc=get(gcf,'color');
     set(lh(2:3),'visible','on','color',bc,'box','off');
% - x-axis hist
     set(lh(2),'xtick',[],'xcolor',bc);
     set(lh(2),'yticklabel',abs(get(lh(2),'ytick')));
% - y-axis hist
     set(lh(3),'ytick',[],'ycolor',bc);
     set(lh(3),'xticklabel',abs(get(lh(3),'xtick')));

us