Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: scatterplot with points labeled with names of variables?


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: scatterplot with points labeled with names of variables?
Date   Mon, 13 Nov 2006 15:20:39 -0600

One way would be to use the added text option (help added text options):

sysuse auto,clear
keep in 1
scatter mpg gear, text(`=mpg' `=gear' "MPG, Gear Ratio", placement(2)) /// 
 || scatter price weight, text(`=price' `=weight' "Price, Weight",
placement(7)) /// 
 xscale(off)  yscale(off) legend(off)


Scott

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Christopher W. Ryan
> Sent: Monday, November 13, 2006 2:24 PM
> To: Statalist
> Subject: st: scatterplot with points labeled with names of variables?
> 
> I want to try producing overlaid scatterplots, in which each overlaid
> graph is a scatterplot of two variables, using data from just one
> observation.  In otherwords, each individual scatterplot would consist
> of just one point.  Since I have 8 variables, graphing them in pairs
> would produce 4 individual scatterplots which, when overlaid, would
> produce a graph with just 4 points, representing data from just one
> observation.
> 
> Each variable is measured on the same -10 to +10 scale.
> 
> The axes would have to be blank, since for each visible point, the axes
> would be of two different variables.
> 
> I would like to label each point with the two variables that generated
> it, like this (using X as the msymbol)
> 
>           X (var1,var2)
> 
>                       X (var3,var4)
> 
> 
>       X (var5,var6)
> 
> I was able to produce the graphs just fine, but I don't know if there is
> a way to make the variable names appear in pairs as labels for the
> points.  Any ideas?
> 


*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index