UpdateGraph: extract or alter graph parameters

Description Usage Arguments Details Value Author(s) Examples

View source: R/UpdateGraph.R

Description

Either grabs the specified label or sets it to a newly specified value. In this case the graph is re-drawn and the graph object is updated.

Usage

1
2
3
4
5
6
7
UpdateGraph(object, ...)

main(graph, label = NULL)

xlab(graph, label = NULL)

ylab(graph, label = NULL)

Arguments

graph,object

The graph object to be updated.

label

the text to be used in place of the current text label. Use of the default NULL leads to the extraction of the current value and no updating is done.

...

the set of parameters to be altered.

Details

Specify the label to be an empty text string if the desire is to delete the current label.

Value

The graph object will be updated in the global environment if a new value is assigned.

Author(s)

A. Jonathan R. Godfrey

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
attach(airquality)
op = par(mfcol=c(3,2))
test1 = TimeSeriesPlot(Wind, col=4)
xlab(test1, "Day")
# check the change is permanent by doing another change
test1 

test2 = TimeSeriesPlot(Ozone)
# using the update method
update(test2, main="important title", sub="subtitles aren't always present", ylab="Ozone (ppb)") 
# finally, change the graph to use different plotting characters/line types
update(test2) # to fix
par(op)
detach(airquality)
rm(test1); rm(test2); rm(op)

BrailleR documentation built on June 5, 2018, 9:04 a.m.