Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: stata under X11


From   [email protected] (Shannon Driver, StataCorp)
To   [email protected]
Subject   Re: st: stata under X11
Date   Thu, 30 Sep 2004 09:46:34 -0500

Stephen Brown <[email protected]> wrote:

> I normally run stata on a unix machine that I access using X11 (an
> Xwindows client running on a Mac, similar to using a a Wintel machine
> with Exceed.)
> 
> 
> Most of the time I am happy running with stata in terminal mode. But
> if I should want to see a graph occasionally, then under stata6 and
> stata7, graphs are readily available.
> 
> Running stata8, this appears not to be the case. It seems that to get
> any graphic capability at all, I have to invoke xstata (rather than
> stata). But this program is so graphically intensive (like SAS) that
> everything to do with stata is horribly slow - especially if I am
> working from home over a DSL line.
> 
> Am I missing something? i.e. is there a way in the terminal type
> version of stata8 to get the graphic window back on an "as and when
> required " basis - as it was in previous versions?

There is no way to view graphics in the console version of Stata 8.  I do,
however, have a fairly simple workaround that may be of interest to you.

Here is a wrapper program that you can use or modify as you wish.

-----Begin mygraph.ado-----

*! version 1.0.0  SRD 30sep2004
program mygraph
	version 8.2
	`0'
	tempfile mygraph
	qui graph export "`mygraph'", as(eps) replace
	!gv "`mygraph'"
end

-----End mygraph.ado-----

To call this program, you would simply type -mygraph <your graph command>-.
The graph command that you give it will be executed.  A tempfile will then be
created, and the graph will be exported to .eps format.  The final command,
-!gv ...-, is a shell call to Ghostview.  This should open Ghostview with your
graph loaded in the window.  One slight issue with this is that Stata will stop
until you close Ghostview.

--Shannon Driver
  [email protected]

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



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