Bin reads (or other genomic feature represented in a .sam file) in sliding windows.  Outputs a tab-delimited file of read counts per window that can then be loading into R or your favorite plotting program.