|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: weighted scatter / different label size
Dear all,
Stata 9.2, born 20 Jul 2007, Win XP.
I would like to produce a scatter plot in which the labels are
"weighted", i.e. are proportional to the size of what they indicate.
Here is an example:
sysuse auto, clear
keep in 1/10
scatter mpg weight [w=price], ms(Oh) msize(large)
In this scatter plot, the hollow circles are weighted; their size is
proportional to the variable price.
If I add labels, however, the hollow circles all have the same size,
despite the applied weights:
scatter mpg weight [w=price], ms(Oh) msize(large) ///
mlabel(make) mlabsize(small)
I could work around this by using a two-way graph:
twoway ///
(scatter mpg weight [w=price], ms(Oh) msize(large)) ///
(scatter mpg weight, ms(none) mlabel(make) mlabsize(small))
Ideally, however, I would like to have a scatter plot in which only the
labels are scattered (which I manage to do), and in which their size is
proportional to a weighting variable (which I don't manage to do).
Any ideas?
Thank you!
Philipp
*
* 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/