home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!know!mips2!news.bbn.com!usc!cs.utexas.edu!uwm.edu!linac!att!cbnewsm!gah
- From: gah@att.com (George A. Howlett)
- Newsgroups: comp.lang.tcl
- Subject: Re: Creating and Import file from an xygraph plot
- Message-ID: <1992Nov12.214523.19035@cbnewsm.cb.att.com>
- Date: 12 Nov 92 21:45:23 GMT
- References: <1992Nov11.144249.11964@calspan.com>
- Sender: news@cbnewsm.cb.att.com (NetNews Administrator)
- Reply-To: george.howlett@att.com
- Organization: AT&T Bell Laboratories
- Lines: 41
- X-Newsreader: TIN [version 1.1 PL6]
- Nntp-Posting-Host: grenache.cnet.att.com
-
- Carol Thielman (thielman@calspan.com) wrote:
- : I am attempting to create a file depicting the information in
- : a xygraph plot. This file can be in one of two formats
- : 1) postscript with a preview immage or 2) raster format. I
- : have looked at the output from the postscript function in xygraph
- : and it does not contain a preview image. Has anyone done this or
- : have any ideas about the easiest way to create these files?
- :
-
- You could create a file containing the X window dump of the xygraph window
- with following proc. It uses the "xwd" program. You simply give it
- the pathname of the xygraph widget and the name of the file store the
- window dump.
-
- From there you can use xv, xwd2ps, or the pbmplus utilities to translate
- the xwd format to whatever format you choose (i.e. PostScript).
-
- I don't know whether this solves your problem.
-
- --gah
-
- ##############################################################
- #
- # CreateWindowDump --
- #
- # Dump the contents of the named window into a given
- # file. The procedure requires the use of the xwd
- # program which comes with standard MIT X distribution.
- #
- # w - Pathname of widget window to dump
- # fileName - Name of file to create (will automatically
- # get .xwd extension)
- #
- # Note: Xwd does not explicitly set an exit code, so you need to
- # catch to results of the exec
- #
- proc CreateWindowDump { w fileName } {
- set winId [winfo id $w]
- set cmd "exec xwd -id $winId -out $fileName.xwd"
- catch $cmd msg
- }
-