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: graph export; path problem


From   Trelle Sven <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: graph export; path problem
Date   Wed, 15 Jan 2014 13:19:19 +0000

Dear all,
I have a problem with the "graph export" command in Stata 12 and hope that = somebody might be able to help (I am not sure whether I asked this question=  before but could not find it in the archive. I know that I had the same pr= oblem in another project. So - I apologize if this question was answered so= me time ago):

I defined the following macros to match the structure of my project folder:

global pp=3D"/Project A/00_Stata" // define path to new project here withou= t drive letter global gd=3D"X:$pp/graphres"

I generate a contour plot and save it with the saving option:

......, ... saving("$gd/contour_rr2.gph, replace")

This all works fine. Later on in my do-file I have the following code:

                graph use "$gd/contour_rr2.gph"

This also works fine i.e. the graph window with the graph opens correctly. = But now the problem starts. I want to save this graph as an .emf-file with = the following code:

                graph export using `"${gd}/contour_rr2.emf"', replace

Stata gives me an error message:
invalid '"X:/Project A/00_Stata/graphres/contour_rr2.emf'
r(198);=A8

It seems that there is a problem with the quotes but I have no clue where t= he problem is/how to resolve it ...
When displaying the path in the graph export command Stata displays the cor= rect path
                . dis `"${gd}/contour_rr2.emf"'
X:/Project A/00_Stata/graphres/contour_rr2.emf

Thanks for any help
Sven Trelle

p.s. right-clicking on the graph in the graph window to save it as an .emf-= file works without any problems.


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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