sleepTime = .01
for (i in seq(1:paletteLength)) {
draw(q[i],q[paletteLength+1-i])
Sys.sleep(sleepTime)
}
for (i in rev(seq(1:paletteLength))) {
draw(q[i],q[paletteLength+1-i])
Sys.sleep(sleepTime)
}
Sorry, initial post stripped newlines. Edited the post.. had to put 2 newlines in order to maintain line breaks. (Tried <code> </code>.. didn't work.)
Should work now!
# Start
draw = function(color="#FFC0CB",border="#FF0000") {
}
msgA="\x48\x61\x70\x70\x79\x20"
msgB="\x56\x61\x6c\x65\x6e\x74\x69\x6e\x65\x73\x20"
msgC="\x44\x61\x79\x20\x3a\x29"
msg=paste(msgA,msgB,msgC,sep='')
plot(c(-9,9), c(0,16), type="n", xlab=msg, ylab="", axes="FALSE")
i=1
paletteLength=50
q = c(colorRampPalette(c("#FFC0CB", "#FF0000"),bias = .1)( paletteLength ))
while(1) {
}
# End