Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!m40g2000yqh.googlegroups.com!not-for-mail
From: perfreem@gmail.com
Newsgroups: comp.soft-sys.matlab
Subject: coloring and customizing scatter plots
Date: Sun, 15 Feb 2009 13:04:21 -0800 (PST)
Organization: http://groups.google.com
Lines: 29
Message-ID: <8bfc318f-d56b-4962-8c19-cd2e4d0ca834@m40g2000yqh.googlegroups.com>
NNTP-Posting-Host: 18.79.2.173
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1234731861 20284 127.0.0.1 (15 Feb 2009 21:04:21 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 15 Feb 2009 21:04:21 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: m40g2000yqh.googlegroups.com; posting-host=18.79.2.173; 
	posting-account=aj71ngoAAAAYxQ83mJE8SXkq6oPGq18K
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) 
	Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:518421


hello,

suppose i have the following scatter plot:

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

how can i set the color of the scatter plot? i tried setting
'MarkerFaceColor' on the return of scatter hist but it does not work..
how can i get the scatter plot's plot handle?

also, i tried resetting the position of the axes. while:

set(lh(2), 'yaxislocation', 'right');

works, doing the same for lh(1) does not. how can i change its axis?

finally, is there a way to get the two marginal histograms to not only
use the same number of bins, but use the same bins in particular? that
way histograms can be compared

thank you.