[19060] in s-news-athena

home help back first fref pref prev next nref lref last post

[S] Summary: saving multiple sheets

daemon@ATHENA.MIT.EDU (Joseph C. Davis)
Fri Aug 27 11:40:23 1999

Message-Id: <37C6AEEC.389D0F56@pdf.com>
Date: Fri, 27 Aug 1999 10:29:48 -0500
From: "Joseph C. Davis" <jdavis@pdf.com>
Reply-To: jdavis@pdf.com
Mime-Version: 1.0
To: S-news <s-news@wubios.wustl.edu>
Content-Type: multipart/mixed;
 boundary="------------72F21E517EB261A961CA32A3"


This is a multi-part message in MIME format.
--------------72F21E517EB261A961CA32A3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Well, it does appear that the answer to my question is indeed very
simple. To have Splus save each separate sheet as a separate file,
simply invoke

graphsheet(file="file###.wmf") or trellis.device(file="file###.wmf")

and the ### will be replaced by a sequence of numbers. To address the
larger problem of getting many files into a presentation or document, Ed
Callahan provided a summary of a previous Snews discussion (which was
also forwarded by Eric Wong).

Thank you very much everyone for your help!

best regards,
jcd

Many thanks to the following respondents:

Andreas Krause <Andreas.Krause@genedata.com>
 John Wallace <jrw@fish.washington.edu>
"Ed Callahan" <callahan@envstat.com>
"Eric Wong" <mcwong@cuhk.edu.hk>



--
Joseph C. Davis, Ph.D.            PDF Solutions, Inc.
101 W. Renner Rd, Ste 100     Software and Consulting for
Richardson, TX 75081          Semiconductor Manufacturing
(972) 889-3025                    fax: (972) 889-2486


--------------72F21E517EB261A961CA32A3
Content-Type: text/plain; charset=us-ascii;
 name="RE [S] powerpoint wizard.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="RE [S] powerpoint wizard.eml"

Return-Path: <callahan@envstat.com>
Received: from panda.csc.cuhk.edu.hk (panda.csc.cuhk.edu.hk [137.189.6.6])
	by hitchhikers.csc.cuhk.edu.hk (8.9.3/8.9.3) with ESMTP id VAA00125
	for <b445786@mailserv.cuhk.edu.hk>; Tue, 27 Apr 1999 21:24:37 +0800 (HKT)
Received: (from daemon@localhost)
	by panda.csc.cuhk.edu.hk (8.9.1a/8.9.1) id VAA21246
	for b445786@mailserv.cuhk.edu.hk; Tue, 27 Apr 1999 21:24:37 +0800 (HKT)
Received: from azure.propagation.net (azure.propagation.net [216.71.32.33])
	by panda.csc.cuhk.edu.hk (8.9.1a/8.9.1) with ESMTP id VAA21209
	for <mcwong@cuhk.edu.hk>; Tue, 27 Apr 1999 21:24:32 +0800 (HKT)
Received: from envstats (pmwino2-24.rconnect.com [209.163.15.24])
	by azure.propagation.net (8.8.5/8.8.5) with SMTP id IAA15365
	for <mcwong@cuhk.edu.hk>; Tue, 27 Apr 1999 08:24:26 -0500
X-PH: V4.4@panda.csc.cuhk.edu.hk
From: "Ed Callahan" <callahan@envstat.com>
To: "Eric Wong" <mcwong@cuhk.edu.hk>
Subject: RE: [S] powerpoint wizard
Date: Tue, 27 Apr 1999 08:21:40 -0500
Message-ID: <000801be90b0$e2b96fc0$180fa3d1@rconnect.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
In-Reply-To: <00e201be9073$c00bf340$ac97bd89@csu.cuhk.edu.hk>
Importance: Normal
X-UIDL: ea5f544a6f0e1843a7290de2176ba484

Eric -

I ended up exporting wmf files and bringing them into MS Word. You could try
something like:

> For() {
> file.name<-paste("Well",i,".SGR",sep="")
> sheet.name<-paste("Well",i,sep="")
> graphsheet(orientation="portrait",Name=sheet.name)
> For(){
> plot(what.ever)
> }
> guiSave( "GraphSheet", Name = sheet.name,
> 	FileName = paste("P:\\[Project path]\\",file.name,sep=""))
> guiClose("GraphSheet", sheet.name)
> }
>
> These commands were in a nested loop that added a pages to a graphsheet
> until the guiClose() function was executed. The outer loop then opened a
> new graphsheet.  This could be adapted for single sheet pages.
>
> Rick Ditmars
> Sr. Geophysicist
> Geomega
> Boulder, CO
> rditmars@geomega.com

You could then get a bunch of single sheet sgr files to bring into the
powerpoint wizard. I've attached an email I received that helped simplify
bringing wmf files into MS Word.

Ed Callahan
callahan@envstat.com


> -----Original Message-----
> From:	Karen_Johnson@bdhq.bd.com [SMTP:Karen_Johnson@bdhq.bd.com]
> Sent:	Wednesday, January 27, 1999 11:07 AM
> To:	s-news@wubios.wustl.edu
> Subject:	[S] Summary fo graphs in a word document
>
>
> I had posted a question on getting masses of graphs into Word
> without individual copying and pasting.  I had also specified,
> "Ideally, I would be able to control graph placement on the page
> and have one word file encompassing the entire report."  (I
> hadn't expected to be able to accomplish the ideal and I am
> *****thrilled***** to learn I was wrong!)
>
>
> Frank Harrell said LaTeX would be ideal for this application.
> And said he will post a message about how to get a technical
> report I'm finishing on this subject.
>
>
> Tom Richards and Nick Ellis gave ways of better copying masses of
> files.
> Tom said,
>    If you are using Splus code to generate the graphs (I assume
>    that you are), you can pull from the History window the code
>    that Splus uses to make a .wmf file, then paste that code into
>    your Splus code file and automatically place the graphs in a
>    .wmf file.  I use this method regularly to generate Powerpoint
>    presentations.
> Nick gave clear, detailed instructions that are appended to the
> end of this message.
>
>
> With Robin Regnier's prompting, I investigated updating links
> once a template is set up.  It works.  Here's the procedure.
>
> Setting up a template
> *  Set up a directory reserved for the template and graphs, (for
> this example use "c:\graphs")
> *  Create the template graphs in S+.
>      graphsheet(file = "c:/graphs/plot###.wmf", format =
> "placeable metafile")
>      for (i in 1:100){
>         plot(0, 0, xlab = '', ylab = '', type = 'n', xaxt = 'n',
>    yaxt = 'n')
>         text(0, 0, labels = paste('plot', i), cex = 5)
>      }
> *  Create a dummy Word report, also stored in c:\graphs for
>    convenience.
> *  Follow Nick's directions to insert the 100 graphs where you
>    want them.  Keep the check boxes 'link to file' and 'save with
>    document' ON.  Save and close the dummy Word report.
>
> Updating the template
> *  Erase the plot###.wmf files in c:\graphs.  (Otherwise S+ will
>    start from file plot101.wmf.)
> *  Open the dummy Word report.  Go to Edit --> Links.  Select all
>    the links and click on 'update now'.
> *  Now the new plots are in their positions.  Save the Word file
>    to a different location with a different name.  As an extra
>    precaution you could also break the links to avoid inadvertent
>    updating.
> *  Of course if there are less than 100 plots, then erase the
>    extra.  If there are more, bring them over in sets of 100.
>
>
> I am ecstatic this works and grateful to all who helped.
> Thanks, KJJ
>
>
>
> Text from Nick's message.
> I use wmf format without trouble. Simplest way to get a wmf file
> is like
> so:
>
> trellis.device(win.printer,file="plot1.wmf",format="placeable
> metafile") ...your trellis plotting commands...
> dev.off()
>
> If it's not a trellis plot then simply
>
> win.printer(file="plot1.wmf",format="placeable metafile")
> ...your ordinary plotting commands...
> dev.off()
>
> To get say 100 files called plot1.wmf, ..., plot100.wmf into
> Word, get
> plot1 in in the usual way........
>
> insert|picture|from file and check 'link to file' and (to save
> space) uncheck 'save with document'.
>
> Now type alt-F9 and you see the graph as a field. eg
> {INCLUDEPICTURE plot1.wmf \* MERGEFORMAT}
> The text in this field is directly accessible and can be found
> using search (ctrl-F).
>
> To include plot2, just copy and paste the field and change plot1
> to plot2. Then go to edit|links, select plot2 and click 'update
> now'. Do alt-F9 again to see the graph. If you had done any
> formatting to plot1 then this will also be applied to plot2.
>
> To ship to clients you have a choice:
> 1) send .doc and .wmf's separately. (Example above will find
> plot1.wmf
> in same directory as .doc file)
> 2) save all plots in the one .doc file by going to edit|links and
> checking 'save with document' for each link or by simply checking
> 'save with document' on the insert|picture dialog box.
>
>
> -----------------------------------------------------------------------
> This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
> send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
> message:  unsubscribe s-news

--------------72F21E517EB261A961CA32A3--

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

home help back first fref pref prev next nref lref last post