Bookmark and Share

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]

st: Twoway-graph appears different in version 11 and version 12


From   Dirk Enzmann <[email protected]>
To   [email protected]
Subject   st: Twoway-graph appears different in version 11 and version 12
Date   Mon, 02 Jul 2012 22:08:54 +0200

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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index