Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, is already up and running.

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

st: RE: Graph png format - differences in scaling between vers. 10 and 11

From   "Kieran McCaul" <>
To   <>
Subject   st: RE: Graph png format - differences in scaling between vers. 10 and 11
Date   Wed, 17 Mar 2010 05:22:25 +0800


have you tried using the -xsize()- and -ysize()- options to set the size
of the graph before you export it?

-----Original Message-----
[] On Behalf Of Johannes
Sent: Tuesday, 16 March 2010 7:49 PM
Subject: st: Graph png format - differences in scaling between vers. 10
and 11

Dear Listers,

I just stumbled across an unexpected behaviour. I updated some graphs
a Beamer-Latex presentation. I used the "png" format. But I used Stata
instead of Stata 10. The result was a file smaller than the previous 
version (by a factor of four) with a smaller resolution. I guess, png is

not a vector format and not indifferent to scaling. So, there is a
picture with less pixels which looks less nice when its size is
Even if I use Stata version-control, there is no difference. These new 
graphs look bad in the presentation, so I recreated them using Stata 10.

There are many workarounds and this is not a big problem  - but is this 
wanted, that the output changes  even when I use version control? And
previous default looked better to me. Or did I overlook something?

The code I used was the following:


twoway (scatte v1 v2 t, connect(l l) mlabel(v1 v2) mlabp(12 12)
O)) (scatte v5 v6 t,  ///
mlabel(v5 v6) mlabp(6 3) msymbol(S T) yaxis(2)), legend(size(small) 
label(1 "S1") label(2 "S2") label(3 "S3") label(4 "S4")) ///
 xlabel(1 "1937-1941" 2 "1942-1946" 3 "1947-1951" 4 "1952-1956" 5 
"1957-1961" 6 "1962-1966" 7 "1967-1971", labsize(small)) ///
ylabel(, labsize(small) axis(1 2)) scheme(sj)  ///
xtitle(Kohorten, size(small) margin(medium)) plotregion(margin(large))
ytitle("XX", size(small) margin(small) axis(1)) ///
ytitle("YY", size(small) margin(small) axis(2)) 

graph export "test.png", replace



*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index