I am interested in creating a scatterplot graph which would include kdensity
functions aligned along the respective variable axes. This could also be
(less functionally done) using scatter points along the axes to indicate
frequency, but this is not optimal.
The command lines below are as close as I have come to what I want, but I
would guess that there is some form of tick rule that could be used to
create these, or at least I hope.
sysuse auto
gen xnought = 130
gen ynought = 30
twoway (scatter turn length, msymbol(circle) msize(medium)) (scatter ynought
length, sort msymbol(circle) msize(vsmall)) (scatter turn xnought,
msymbol(circle) msize(vsmall))
What I would very much like to end up with is a kdensity function on both
axes, similar to the one created for the x-axis using:
twoway (scatter turn length, msize(vsmall)) (kdensity length, yaxis(2) epan
clpat(shortdash) clwidth(vthin)) (scatter turn xnought), yscale(range(0.0
2) axis(2))
Since the above command line uses up the right axes, I would prefer not to
use it if possible. I am using StateSE 8.
Thanks in advance,
Daniel Egan
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/