win.slide
provides nice defaults for S-Plus for Windows for creating
graphics with a larger
font, thicker lines, and better axis labeling. These images can be used
to make nice slides.
Specify
type=1
(uses Times New Roman font) to make
nice fullsize graphs or
type=3
(the default) for making
landscape graphs using 16-point type (useful for submitting
to journals).
type=2
is for color slides, with a default blue
background and yellow foreground (assuming yellow is
col=5
; note
that you may have better success in Windows S-Plus using the
Color
Schemes
menu to set the background to transparent and the text to
white, then using the
Export Graph
menu to export to PowerPoint).
Use
type=4
to make nice black and white overhead projection
transparancies (portrait mode). This uses line thickness 3, pointsize 18,
Helvetica font, height 8, width 7.
For
type=3
, numbers of the y-axis are drawn horizontally by defaulting
las
to
1
.
For S-Plus for Windows, the function
gs.slide
sets up defaults for
a graph sheet such that when the finished graph sheet is copied to the
clipboard and pasted into a Microsoft application the results will be nice.
You can also export the graph sheet to a variety of file formats.
The
file
,
format
,
type
,
font
,
pointsize
, and
pch
arguments do
not apply to
gs.slide
.
win.slide
and
gs.slide
calls
mgp.axis.labels
in Hmisc set up
axis-specific defaults for the 2nd
mgp
graphical parameter.
See
Overview
for Hmisc for help.
This is only used automatically for select high-level graphics
functions in Hmisc and Design, as S-Plus only supports a single
distance between tick marks and tick mark labels using
par
, and
when
las=1
a larger distance is needed for the y-axis.
win.slide(file, format='placeable metafile', type=3, font, pointsize, lwd, mgp, mar, oma, pch=1, bty="l", height, width, las, background=if(type==2)'blue' else 'white', col=if(background=='blue')5 else 1) gs.slide(cex=1.2, lwd=2, mgp=c(4,.6,0), mar=c(6,6,2,1)+.1, oma=c(.7, .6, .6, 0), tck=-.013, las=1, bty='l')
file
is specified,
win.printer
is used to write the graphic output
to the specified file name. Otherwise,
win.graph
is used to create
graphics interactively. When
format="placeable metafile"
(the default), a
suffix of
.wmf
will automatically be added to
file
if it has
no suffix.
file
is specified. The default is suitable for use
with Microsoft Powerpoint. If
file=""
, format is always set to
"printer"
.
par
par
)
par
). Default is
c(.7,.6,.6,0)
so that x-axis labels are
not cut off by Powerpoint, for example.
par
. Default is an octagon.
"l"
for
"L"
shape. Use
"c"
for complete box.
type=4
)
0
to draw axis labels parallel to the axis,
1
to draw them
horizontal, and
2
to draw them perpendicular to the axis
Frank Harrell
f.harrell@vanderbilt.edu
if(FALSE) { win.slide() # type=3 plot(x, y) points(x2, y2, cex=.6) # use smaller points title("My Title") # ..... dev.print(file='/tmp/myplot', format='placeable metafile') # Creates \tmp\myplot.wmf to use in MS Powerpoint, etc. # Leaves graphics window open win.slide('myplot') plot(...) dev.off() # Creates myplot.wmf, automatically using win.printer win.slide('') # direct to printer # For S-Plus 4.0 or later for Windows: gs.slide() plot(...) # Then click on the graph sheet and type control-C to copy; get under # Microsoft application and type control-V to paste mgp.axis.labels(c(.4,1.2)) # override 2nd mgp parameters for x- and y axes mgp.axis.labels(type='x') # retrieve 3 mgp parameters for x-axis }