t = seq( 0, +5, length.out=1000 ) f = rep( 0, length(t) ) f[ (0 <= t) & (t < 1) ] = 1 f[ (1 <= t) & (t < 2) ] = -1 f[ (2 <= t) & (t < 3) ] = 1 f[ (3 <= t) & (t < 4) ] = -1 #postscript("../../WriteUp/Graphics/Chapter6/chap_6_sect_3_prob_8_plot.eps", onefile=FALSE, horizontal=FALSE) plot( t, f, type='p', cex=0.25, pch=20, col='black' ) points( c(0, 1, 2, 3, 4), c(1, -1, 1, -1, 0), pch=20, col='black', cex=1.5 ) grid() #dev.off()