Learn R Programming

icesTAF (version 3.6.0)

zoom: Zoom

Description

Change text size in a lattice plot.

Usage

zoom(x, ...)

# S3 method for trellis zoom(x, size = 1, main = 1.2 * size, lab = size, axis = size, strip = size, sub = 0.9 * size, legend = 0.9 * size, splom = 0.9 * size, ...)

Value

The same lattice object, but with altered text size.

Arguments

x

a lattice plot of class "trellis".

...

further arguments, currently ignored.

size

text size multiplier.

main

size of main title (default is 1.2 * size).

lab

size of axis labels (default is size).

axis

size of tick labels (default is size).

strip

size of strip labels (default is size).

sub

size of subtitle (default is 0.9 * size).

legend

size of legend labels (default is 0.9 * size).

splom

size of scatterplot matrix diagonal labels (default is 0.9 * size).

Details

Pass NULL for any argument to avoid changing the size of that text component.

The legend component of a lattice plot can be somewhat fickle, as the object structure varies between plots. One solution is to pass legend = NULL and tweak the legend before or after calling the zoom function.

See Also

Lattice plots are created using xyplot or related functions.

taf.png opens a PNG graphics device.

icesTAF-package gives an overview of the package.

Examples

Run this code
library(lattice)

xyplot(1~1)
zoom(xyplot(1~1))
zoom(xyplot(1~1), size=1.2)
zoom(xyplot(1~1), axis=0.8)
zoom(xyplot(1~1), axis=NULL)

if (FALSE) {
taf.png("myplot")
plot(1)
dev.off()

taf.png("mytrellis")
xyplot(1~1)
dev.off()

taf.png("mytrellis_zoom")
zoom(xyplot(1~1))
dev.off()
}

Run the code above in your browser using DataLab