[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Davide Cantoni" <davide.cantoni@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: File not a Stata .gph file |

Date |
Thu, 14 Feb 2008 21:55:09 -0500 |

Hello Sergiy, thanks a lot for your comments. Let me answer in the right order. I typed in the numbers by hand (it's only 5 obs -- just type in any numbers to replicate) into the stata editor for var1 and var 2 , then I run the following do-file: *** do-file begins *** gen lb = var1-invnormal(0.025)*var2 gen ub = var1+invnormal(0.025)*var2 label var var1 "Point Estimate" label var lb "Lower" label var ub "Upper bound of CI" gen int var5 = 130 in 1 replace var5 = 134 in 2 replace var5 = 138 in 3 replace var5 = 142 in 4 replace var5 = 146 in 5 rename var5 quarter format quarter %tqCY:q twoway (rcap lb ub quarter) (scatter var1 quarter), yline(0) legend(region(lstyle(none))) scheme(s1color) xtitle(year) ytitle(coefficient) subtitle("Consumption later (Sum), nn matching") graph save "consbought_sum_panel_nnmatch.gph", replace asis graph export "consbought_sum_panel_nnmatch.gph", as(pdf) replace *** do file ends *** I should also add that the graph export as(pdf) command at the end is not working either (no pdf file is created) even though Stata does not give me an error message, either. But this may be secondary at this stage. (2) Yes, many of the older graphs are exactly the same combination of rcap+scatter, with similar if not identical options. (3) I tried dropping observations one at a time, and it does not work. (5) the same happens on another computer with Windows platform. The interesting observation is that if, after the end of the do file, I repeat the twoway command and the graph save command by hand, the saving works fine. Best, Davide On 14/02/2008, Sergiy Radyakin <serjradyakin@gmail.com> wrote: > Hello Davide, > > 1) can you post the original command which builds the graph in the first place? > 2) is any of the "older" graphs similar/exactly same as the one that > stopped working? > 3) can you kick out observations from your data and see if save/use > starts working at some point? if it does not and the number of obs is > low enough may be you could post the data as well? > 4) try to trace graph use, and see where it breaks down. > 5) try to open your gph file on another computer/platform. If it opens > -- then there is something wrong with graph use on your machine, if > not - there is smth wrong with graph save. Can you post the gph file? > 6) rcap works fine on Stata / Windows 9.2: > > twoway rcap length weight price > graph save "X:\untitled.gph", replace > graph use X:\untitled.gph > > Best regards, Sergiy > > > On 2/14/08, Davide Cantoni <davide.cantoni@gmail.com> wrote: > > Hello, I am having a problem in creating a twoway (rcap + scatter) > > graph. I create the graph and save it as a .gph (Stata executes the > > command without any error messages); then, when I try to reopen it, > > Stata (Intercooled Stata 9.2 for Mac) says: > > > > . graph use "/consbought_sum_panel_nnmatch.gph" > > file not a Stata .gph file > > r(610); > > > > Again, when I had saved the graph in the first place, Stata gave no > > error messages. I tried to check the following: > > > > - saving with "asis" option: same problem. > > - other, older graphs I saved previously are fine and can be opened > > - I copied and pasted the relevant variables into a new dataset, and > > created/saved the graph out of that: same problem. > > - I ran one of the examples (about twoway rcap) in the help files, > > saved it as .gph, reopened: worked fine. > > > > Is anyone aware of what might cause such an error? > > > > Thanks for your suggestions, > > > > Davide > > * > > * For searches and help try: > > * http://www.stata.com/support/faqs/res/findit.html > > * http://www.stata.com/support/statalist/faq > > * http://www.ats.ucla.edu/stat/stata/ > > > * > * For searches and help try: > * http://www.stata.com/support/faqs/res/findit.html > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ > * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: File not a Stata .gph file***From:*"Sergiy Radyakin" <serjradyakin@gmail.com>

**References**:**st: File not a Stata .gph file***From:*"Davide Cantoni" <davide.cantoni@gmail.com>

**Re: st: File not a Stata .gph file***From:*"Sergiy Radyakin" <serjradyakin@gmail.com>

- Prev by Date:
**Re: st: _regress (stata9)** - Next by Date:
**Re: st: File not a Stata .gph file** - Previous by thread:
**Re: st: File not a Stata .gph file** - Next by thread:
**Re: st: File not a Stata .gph file** - Index(es):

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