Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Twoway-graph appears different in version 11 and version 12
From
Alan Riley <[email protected]>
To
[email protected]
Subject
Re: st: Twoway-graph appears different in version 11 and version 12
Date
Tue, 3 Jul 2012 09:48:51 -0500
Dirk Enzmann ([email protected]) reported a difference in
the positioning of a graph title between Stata 11 and Stata 12.
His original email follows my signature below.
We have reproduced the issue here and will fix it in a future update.
In the meantime, Dirk can work around this, as Scott Merryman suggested,
by adding the option -position(12)- to his overall graph -title()- option.
Alan
[email protected]
> I can't find the reason why the following -twoway- syntax produces
> graphs that look vastly different in Stata 12 as opposed to Stata 11 (in
> Stata 11.2 it appears as intended whereas in Stata 12.1 it does not).
>
> Note: If you run the complete demonstration below, two files (graphs
> created by my own Stata versions 11.2 and 12.1) will be copied into your
> temp-directory and erased afterwards (but it will not overwrite files
> that exist already) - I hope the longer line containing
> "title("Verhaltensprobleme ..." will not get broken in the email sent:
>
> * --- Start Stata demonstration ----
>
> global testurl = "http://www.ottersbek.de/Stata/"
> use "${testurl}testdat.dta", clear
>
> twoway (scatter behavior gewalt if black==0, mcolor(blue) ///
> msymbol(circle_hollow) jitter(2) jitterseed(1)) ///
> (scatter behavior gewalt if black==1, mcolor(red) ///
> msymbol(circle_hollow) jitter(1) jitterseed(1)) ///
> (line pr_beh gewalt if black==0, sort lcolor(blue)) ///
> (line pr_beh gewalt if black==1, sort lcolor(red)), ///
> ytitle("Wahrscheinlichkeit von Verhaltensproblemen", ///
> size(small)) ///
> xtitle("Gewalteinstellung", size(medsmall)) ///
> xscale(range(10 90)) xlabel(10(20)90) ///
> note("Linien: aus logistischer Regression geschätzt" ///
> "Punkte: beobachtete Werte") ///
> legend(order(1 "weiß" 2 "schwarz") ///
> title("Ethnizität: ", size(medsmall) position(9))) ///
> title("Verhaltensprobleme in Abhängigkeit von Ethniz. u.
> Gewalteinst.", ///
> size(medium)) ///
> name(L11_LogReg, replace)
>
> * Copy demo .gph-files into tempdir:
> local pwdir = c(pwd)
> local tmpdir = c(tmpdir)
> cd "`tmpdir'"
> copy "${testurl}L11_version11.gph" "L11_version11.gph"
> copy "${testurl}L11_version12.gph" "L11_version12.gph"
> cd "`pwdir'"
>
> /* Graph created with Stata version 11.2
> (Stata/SE 11.2 for Windows (32-bit) Born 16 Feb 2012): */
> graph use "`tmpdir'/L11_version11.gph", name("L11_version11", replace)
> /* Graph created with Stata version 12.1
> (Stata/SE 12.1 for Windows (64-bit x86-64) Revision 20 Jun 2012): */
> graph use "`tmpdir'/L11_version12.gph", name("L11_version12", replace)
>
> * Erase demo .gph-files:
> local tmpdir = c(tmpdir)
> erase "`tmpdir'/L11_version11.gph"
> erase "`tmpdir'/L11_version12.gph"
>
> * --- End Stata demonstration ----
>
> My operating system: Windows 7 (64 bit)
>
> Dirk
*
* 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/