[19096] in s-news-athena

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

RE: [S] SP2000, Trellis, and scripts

daemon@ATHENA.MIT.EDU (Rick Ditmars)
Thu Sep 2 11:12:10 1999

Message-Id: <01BEF522.8EC9B6F0.rditmars@geomega.com>
From: Rick Ditmars <rditmars@geomega.com>
To: Rick Ditmars <rditmars@geomega.com>,
        "'Prof Brian D Ripley'"
	 <ripley@stats.ox.ac.uk>
Cc: "'s-news@wubios.wustl.edu'" <s-news@wubios.wustl.edu>
Date: Thu, 2 Sep 1999 09:07:17 -0600
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit


Thank you, Prof. Ripley, for your quick response.  Adding print functions 
solved the problem.  As for my color selection, hard copy is on white 
background, tmp.sym makes other changes to default symbols and colors (see 
below), and I am afraid that "Uncle Boss" over-rules "Uncle Bill" on such 
issues! ;)

tmp.sym
$cex:
[1] 1.0 1.0 0.8 0.8 0.8 0.8 0.8

$col:
[1] 2 4 4 5 6 7 8

$font:
[1] 1 1 1 1 1 1 1

$pch:
[1] 1 2 1 1 1 1 1

"Completions" only has two levels so I only modified the first two 
defaults. I increased the size of the symbols because ultimately the 
histograms and strip plots will be stacked on one page (portrait) and with 
the reduction the default size is too small.  By the way, the combination 
is being accomplished by exporting to .wmf and handing over to our talented 
graphics artists who use Adobe Illustrator to combine the plots on one 
page, align the x-axes of the two plots, and make other prettifications. I 
have been able to do things like align axes with traditional graphics by 
tweeking various par() settings, but have not discovered how to do this 
with trellis graphics.  If this can be accomplished with trellis graphs, it 
would remove one more burden off of the graphics staff.

Thanks again,

RIck Ditmars
Sr. Geophysicist
Geomega
Boulder, Co
rditmars@geomega.com
www.geomega.com
----------
From: 	Prof Brian D Ripley[SMTP:ripley@stats.ox.ac.uk]
Sent: 	Wednesday, September 01, 1999 11:55 PM
To: 	Rick Ditmars
Cc: 	's-news@wubios.wustl.edu'
Subject: 	Re: [S] SP2000, Trellis, and scripts


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

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