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: statalist-digest V4 #3966

From   Christopher Robert <[email protected]>
To   statalist <[email protected]>
Subject   st: Re: statalist-digest V4 #3966
Date   Mon, 8 Nov 2010 06:50:30 -0500

Hi Jen,

I think that the problem is the ", replace" in your saving() option.
cmogram (for better or for worse) always replaces, and doesn't take a
replace option. In the code below, it seems the ", replace" may be
passed to graph export in an odd way. I'm surprised that it's not
showing up in the filename.

if "`saving'"~="" {
  graph export "`saving'", name(combined) replace
  graph drop combined

However, I suspect that it's confusing the export command with respect
to the format, so that Nick's right: it's being saved in Stata format
rather than the format you think it's being saved in. I have had good
luck saving as both .png and .eps, and I suspect you will too once you
drop the ", replace" option.



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

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:

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