#postscript("../../WriteUp/Graphics/Chapter2/chap_2_sect_8_prob_9_plot.eps", onefile=FALSE, horizontal=FALSE) ts = seq( -1.5, 1.5, length.out=100 ) phi_1 = ts^3 / 3 phi_2 = ts^3 / 3 + ts^7 / 63 phi_3 = ts^3 / 3 + ts^15 / 59535 + ( 2*ts^11 ) / 2079 + ts^7 / 63 all_phis = c( phi_1, phi_2, phi_3 ) min_y = min( all_phis ) max_y = max( all_phis ) plot( ts, phi_1, type='l', ylim=c( min_y, max_y ), col='blue', xlab='t', ylab='phi_n(t)' ) lines( ts, phi_2, type='l', col='green' ) lines( ts, phi_3, type='l', col='red' ) legend( 'topleft', c('phi_1', 'phi_2', 'phi_3'), lwd=2, lty=1, col=c('blue', 'green', 'red') ) grid() #dev.off()