r scripts for graphical display