Learn R Programming

caroline (version 0.5.0)

plotClock: Plot a simple clock.

Description

Used to create a clock on a plot as a way to keep track of the additional parameter of time for use in animated movies of multiple plots.

Usage

plotClock(hour, minute, x0 = 0, y0 = 0, r = 1)

Arguments

hour
integer specifying the position of the hour hand.
minute
integer specifying the position of the minute hand.
x0
number specifying the x position of the clock.
y0
number specifying the y position of the clock.
r
number specifying the radius of the clock.

Value

  • a plot of a clock

Examples

Run this code
plot(0,0, xlim=c(-1,1), ylim=c(-1,1),pch='')
plotClock(4, 20)

Run the code above in your browser using DataLab