Maarten Buis has posted a method which appears
to make you happy. That's good.
I want to make you unhappy again, or rather uneasy.
When people want this I often wonder they mean precisely.
Do they want the linear dimension of text to be
proportional to whatever it is, or the areal dimension?
That's two different possibilities for a start.
(Which, or what, does -mlabsize()- do?)
(I dimly recall psychological literature to the effect
that when people see areas, they perceive them roughly
as area^0.7, so it's best to be sceptical about what
people actually _decode_ from a size _encoding_.)
Or do they really mean "proportional" when they say that,
or are they thinking of some monotonic function of
size?
Price in the auto data is unlikely to be your real example
but it illustrates the issues. Max/min is almost 5,
which is not extraordinary. With that kind of range,
it is difficult to get the smallest text readable
yet the largest not ridiculously large, and conversely
the largest text modest and the smallest text still
readable.
Just wondering.
If I had an easy solution for the problem of x, y, z
on a 2-D diagram I would have told you!
Nick
[email protected]
Philipp Rehm
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).
*
* 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/