[19094] in s-news-athena
Re: [S] SP2000, Trellis, and scripts
daemon@ATHENA.MIT.EDU (Prof Brian D Ripley)
Thu Sep 2 01:59:44 1999
Date: Thu, 2 Sep 1999 06:55:15 +0100 (BST)
From: Prof Brian D Ripley <ripley@stats.ox.ac.uk>
To: Rick Ditmars <rditmars@geomega.com>
Cc: "'s-news@wubios.wustl.edu'" <s-news@wubios.wustl.edu>
In-Reply-To: <01BEF499.F71625B0.rditmars@geomega.com>
Message-Id: <Pine.GSO.4.05.9909020645130.11166-100000@auk.stats>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 1 Sep 1999, Rick Ditmars wrote:
>
> S-Plussers,
>
> WinNT, SP 2000.
>
> I have encountered some interesting behavior trying to automate graphsheet
> production and saving with a script file. I am attempting to loop through
> a list of parameters, generate a stripplot and histogram for each
> parameter, and save to disk; two pages per graphsheet, one graphsheet per
> parameter. When I assign the index in the command window (i<-3, for
> example) and block-select and run the guts of the for-loop, every thing
> runs fine. However, when I run the entire script, I end up with an SGR
> file for each parameter containing one empty page.
That is because Trellis graphics are not produced until they are printed,
and that does not happen inside a for loop. Put print() around the
stripplot and histogram calls.
> Also notice the trellis.par.set()/trellis.par.get() combination. The only
> way for trellis.par.set() to work is to run trellis.par.get(), leave the
> graphsheet it creates open, and then run trellis.par.set(). If you close
> the sheet before running .set() wierd things happen to the settings. This
> is the first time I have used these commands, but that seems unusual to me.
trellis.par.set() sets the parameters of the current device, so
(i) you need a current device (and may get one auto-launched) and
(ii) they need to be appropriate to the device.
This is like saying `I set the font size on a plot, closed the plot
and then the next one did not have the font sizes I set', which is not
unusual in my experience.
[...]
> for(i in c(1,2,3,4,5,6,13,16,17,18,19)){
c(1:6, 13, 16:19) would be more readable
> trellis.par.get("superpose.symbol")
> trellis.par.set("superpose.symbol", tmp.sym)
>
> guiModify( "GraphSheet", Name = "GSD2",
> GraphSheetColor = "Bright White")
Uncle Bill Cleveland will disapprove: all the other colours are set
up assuming a grey background, and cyan (the main foreground) colour on
white is not a good choice for most people.
[...]
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-----------------------------------------------------------------------
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