[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Kdensity functions on the axes of a scatterplot
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.
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,
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
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,
* For searches and help try: