Statalist


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

st: RE: How to graph a large plot which contains several two-way scatter plots in it?


From   "Martin Weiss" <martin.weiss@uni-tuebingen.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: How to graph a large plot which contains several two-way scatter plots in it?
Date   Mon, 14 Apr 2008 21:37:37 +0200

Your question is not exactly getting any clearer, but here is some code that
may help you figure it all out:


***********

clear*
set obs 50

g x=uniform()
g y=invnormal(uniform())

g byte statedum=1
la var statedum "Dummy for Groups of States"

forv i=2/5{
	replace statedum=`i' in `=(`i'-1)*10+1'/`=`i'*10'
}

levelsof statedum, local(st)


foreach sta in `st'{
	scatter y x, title("This is the scatterplot for group of states
`sta'") name(stgr`sta') nodraw
}


gr combine stgr1  stgr2  stgr3  stgr4  stgr5, cols(2)

************


Martin Weiss
_________________________________________________________________

Diplom-Kaufmann Martin Weiss
Mohlstrasse 36
Room 415
72074 Tuebingen
Germany

Fon: 0049-7071-2978184

Home: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1130

Publications: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1131

SSRN: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=669945

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Patricia Yu
Sent: Monday, April 14, 2008 9:04 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: How to graph a large plot which contains several two-way
scatter plots in it?

Hi,
I have a dataset which contains 50 states, and I want to group 10 states in
one large plot which contains 10 little two-way scatter plots for each
state.
Finally, I will have five large plots. Each of them will contain 10 little
two-way scatter plots for each state.
How can I do these?
How can I create a variable that groups 10 states together and each state
has its own code?
Thanks.
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
PATRICIA YU
Ph.D. Student & Project Assistant
Dept. of Educational Leadership & Policy Analysis
University of Wisconsin-Madison
Cell: 608/556-3489
Home: 608/231-6855
E-mail: pyu1@wisc.edu
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
 


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


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index