# # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- save_plots = F # Chapter 5: Exercise 77 # x = seq( from=0, to=30, length.out=100 ) y = 30 - x if( save_plots ){ postscript("../../WriteUp/Graphics/Chapter5/ex_77.eps", onefile=FALSE, horizontal=FALSE) } plot( x, y, type='l', xlim=c(0,+40), ylim=c(0,30) ) y = 20 - x lines( x, y, type='l', col='black' ) abline( h=0 ) abline( v=0 ) polygon( c(20,30,0,0), c(0,0,30,20), col='gray' ) grid() if( save_plots ){ dev.off() }