# View the astsa palette
astsa.col(1:8, pie=TRUE)
legend('topright', legend=astsa.col(1:8), fill=1:8, title='Hex Color Code')
# Plotting 2 series that touch (but in a nice way)
tsplot(cbind(gtemp_land, gtemp_ocean), col=astsa.col(c(4,2), .5), lwd=2, spaghetti=TRUE,
type='o', pch=20, ylab="Temperature Deviations", addLegend=TRUE, location='topleft',
legend=c("Land Only", "Ocean Only"), gg=TRUE)
# The hsv values for Dodgerblue3 (or astsa color 4)?
rgb2hsv(col2rgb(4))
# Wheels of fortune
vanna = par(no.readonly = TRUE)
par(mar=rep(0, 4))
layout( matrix(c(1,3,2,3), 2) )
astsa.col(4, wheel=TRUE, num=8, pie=TRUE)
astsa.col(4, wheel=TRUE, num=8, pie=TRUE, sat=.6, val=.9)
astsa.col(2, wheel=TRUE, num=100, pie=TRUE, border=FALSE, labels=NA)
# I'd like to solve the puzzle
par(vanna) # reset graphic device
x = replicate(6, sarima.sim(ar=c(1.5,-.75), n=120))
tsplot(x, spag=TRUE, col=astsa.col(4, alpha=.7, wheel=TRUE, num=6), lwd=12)
Run the code above in your browser using DataLab