Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: row and column titles for graphs with the by option


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: row and column titles for graphs with the by option
Date   Thu, 22 Oct 2009 00:06:29 +0200

<>

Use the graph editor with the textboxes and spin them to vertical orientation, apply the "bluish-gray" background. Record the whole thing for convenient playback...


HTH
Martin


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Maarten buis
Sent: Mittwoch, 21. Oktober 2009 23:47
To: stata list
Subject: st: row and column titles for graphs with the by option

Does anyone know a trick to create the following graph? Start with
the graph in the example below. 

*--------------- begin example ----------------
sysuse auto, clear
recode rep78 1/2=3
label define rep78 3 "average" 4 "good" 5 "excelent"
label value rep78 rep78
scatter price mpg , by(foreign rep78) name(rowcol, replace)
*---------------- end example -----------------

Notice that there is quite a bit of redundancy in the information 
contained in the graph titles. So I was thinking of a graph where
the columns where labeled on the top as "average", "good", 
"excelent", and the rows where labeled on the right as "domestic", 
and "foreign". 

The example below shows how to create those "column titles", but
I am struggling with "row titles".

*----------------- begin example ---------------------
sysuse auto, clear
recode rep78 1/2=3
egen byvar = group(foreign rep78)
label define byvar 1 "average" 2 "good" 3 "excelent" ///
                   4 " " 5 " " 6 " "
label value byvar byvar
scatter price mpg , by(byvar) name(col, replace)
*------------------ end example -----------------------

-- Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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