Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

scatter plots with marginal boxplots (and tufte axes)

35 views
Skip to first unread message

perf...@gmail.com

unread,
Jan 31, 2009, 3:34:12 PM1/31/09
to
hello,

i have a few questions about plotting scatter plots and changing their
axes.

1] if i have a simple scatter plot, like

a = [0:.01:10];
b = a.*rand(1,length(a));
scatter(a,b);
set(gca, 'Box', 'off', 'LineWidth', 1);
set(gca, 'TickDir', 'out');

how can i make it so the two axes do not cross at 0? with the above
they extend past each other. how can i prevent the two ticks from
coming out just at the (0, 0) point?

2] is there a way to add a box plot for the marginals (a and b) for
this plot on the sides? like scatterhist(a,b) except showing box plots
rather than the histogram?

3] is there a way in matlab to make the x and y axes separate from
each other, like Tufte axes? for example, see:
http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=81

thanks you for your help, i appreciate it!

James Houghton

unread,
Dec 10, 2009, 1:13:05 PM12/10/09
to
>
> 3] is there a way in matlab to make the x and y axes separate from
> each other, like Tufte axes? for example, see:
> http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=81
>

Check out: http://www.mathworks.com.au/matlabcentral/fileexchange/26061-rangeframe-1-0

0 new messages