Statalist


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

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


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

<> 


So one can put the code emanating from the recording verbatim into a do-file and Stata complies with it? I was discouraged to do that by the line in the .grec files that says "// Edit only if you know what you are doing." Sounded like mortal danger...


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Maarten buis
Gesendet: Donnerstag, 22. Oktober 2009 12:34
An: [email protected]
Betreff: Re: st: row and column titles for graphs with the by option

Thanks to Scott and Martin for responding. Martin's solution to
look at graph editor pointed me in the right direction. Looking
at the recorded changes reminded me that one can manipulate 
graphs directly and gave me the right hints on how to do so.
Below is the graph I was after:

*------------------- 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,                                        ///
    r2title(Car type, orientation(rvertical))        ///
    t1title(Repair Record 1978, size(medsmall)))     ///
    name(col, replace) 

.col.plotregion1.r1title[3]._set_orientation rvertical
.col.plotregion1.r1title[3].text = {}
.col.plotregion1.r1title[3].text.Arrpush Domestic

.col.plotregion1.r1title[6].text = {}
.col.plotregion1.r1title[6].text.Arrpush Foreign

graph display
*---------------- 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