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