Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: RE: Problem with saving graphs

From   "Martin Weiss" <>
To   <>
Subject   st: RE: Problem with saving graphs
Date   Sat, 11 Sep 2010 15:32:34 +0200


To export graphs, see -help graph_export-. 

The statement in the help for -help saving_option- that 

"If filename is specified without an extension, .gph will be assumed."

may have misled you into thinking that you could just give it a different
extension and it would export for you...


-----Original Message-----
[] On Behalf Of
Sent: Samstag, 11. September 2010 13:37
Subject: st: Problem with saving graphs

I seem to be having a problem with saving my Stata 10.1 graphs using OSX

I run a do file which reads:

version 10
#delimit ;
clear ;
sysuse cancer.dta ;
stset studytime, fail(died==1) ;
sts graph, saving(graphtest.png, replace) ;

The graph appears in the graph viewer but when I go to open png file I get
message "The file "graphtest.png" could not be opened. It may be damaged or
a file format that Preview doesn't recognize" I've tried saving the graph in
different formats and I get the same message.

The odd thing is that if I manually save the graph using the "save" icon on
graph viewer, then I have no problem; the graph saves perfectly as a png or
whatever format I choose. I've tried saving graphics and pictures using
applications and I had no problem, it only seems to happen using Stata.

Has anybody else had this problem? Does anyone know of a solution?

Best etc.


Matthew Kerby
Assistant Professor
Department of Political Science
Memorial University of Newfoundland
St. John's, NL, A1C5S7, Canada

*   For searches and help try:

*   For searches and help try:

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