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: RE: Problems opening a Stata produced graphics file with any other program afterwards


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: Problems opening a Stata produced graphics file with any other program afterwards
Date   Sun, 7 Nov 2010 20:00:36 +0000

Specifying .png or .eps in a -saving()- option applies that extension but does not convert them to the file format you think is implied. They remain Stata graphs, but now with misleading extensions. So external programs cannot make head or tail of them. 

You need to use -graph export-. 

Nick 
[email protected] 

Jen Zhen

I am producing some nice graphs with Chris Roberts' cmogram command.
However, after I've saved them, I cannot open or view them.
I've tried both saving them as "graph.png" and as "graph.eps".
I've also tried it both by adding to the graphing command the option
-- saving("graphname&directory", replace) --,
and by using separately, i.e. afterwards, the command -- graph save
"graphname&directory", replace --.

But I only get files that afterwards I can open neither directly (when
I double-click on it I get the error message "invalid image") nor in
Scientific Workplace/Latex (where I get the error message "current
file data is bad in [graphname&directory]" or "Could not import file
[graphname&directory]".

Does anyone know what's wrong here? Just in case I should maybe add
that before I can look at them I have to file-transfer them out of the
secure data server, but I don't think the transfer program would in
any way damage the files?

I'm also giving you my complete graphing command:
cmogram depvar indepvar if sample==1 & inrange(indepvar,90,110),
scatter cutpoint(100) lineat(100) qfit histopts(bin(10))
title("Title") graphopts(note("notes" "and more notes"))
saving("/directory/graph.png", replace)


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