plotCoverage samples 1 million positions of the genome to build a coverage histogram. Multiple BAM files are accepted but all should correspond to the same genome assembly.

detailed help:
plotCoverage -h

usage: plotCoverage --bamfiles FILE1 FILE2 [FILE1 FILE2 ...] --plotFile
                    PLOTFILE [--help]
                    [--labels sample1 sample2 [sample1 sample2 ...]]
                    [--plotTitle PLOTTITLE] [--skipZeros]
                    [--numberOfSamples NUMBEROFSAMPLES] [--outRawCounts FILE]
                    [--plotFileFormat FILETYPE] [--region CHR:START:END]
                    [--numberOfProcessors INT] [--verbose]
                    [--extendReads [INT bp]] [--ignoreDuplicates]
                    [--minMappingQuality INT] [--centerReads]
                    [--samFlagInclude INT] [--samFlagExclude INT] [--version]
optional arguments
--version show program’s version number and exit
Required arguments
--bamfiles, -b List of indexed BAM files separated by spaces.
--plotFile, -o File name to save the plot to
Optional arguments
--labels, -l User defined labels instead of default labels from file names. Multiple labels have to be separated by spaces, e.g. –labels sample1 sample2 sample3
--plotTitle=, -T=
 Title of the plot, to be printed on top of the generated image. Leave blank for no title.
 By setting this option, genomic regions that have zero or nan values in all samples are excluded.
--numberOfSamples=1000000, -n=1000000
 Number of 1 base regions to sample. Default 1 million
--outRawCounts Save raw counts (coverages) to file.

Image format type. If given, this option overrides the image format based on the plotFile ending. The available options are: png, eps, pdf and svg.

Possible choices: png, pdf, svg, eps

--region, -r Region of the genome to limit the operation to - this is useful when testing parameters to reduce the computing time. The format is chr:start:end, for example –region chr10 or –region chr10:456700:891000.
--numberOfProcessors=max/2, -p=max/2
 Number of processors to use. Type “max/2” to use half the maximum number of processors or “max” to use all available processors.
--verbose=False, -v=False
 Set to see processing messages.
Read processing options
--extendReads=False, -e=False
 This parameter allows the extension of reads to fragment size. If set, each read is extended, without exception. *NOTE*: This feature is generally NOT recommended for spliced-read data, such as RNA-seq, as it would extend reads over skipped regions. *Single-end*: Requires a user specified value for the final fragment length. Reads that already exceed this fragment length will not be extended. *Paired-end*: Reads with mates are always extended to match the fragment size defined by the two read mates. Unmated reads, mate reads that map too far apart (>4x fragment length) or even map to different chromosomes are treated like singe-end reads. The input of a fragment length value is optional. If no value is specified, it is estimated from the data (mean of the fragment size of all mate reads).
 If set, reads that have the same orientation and start position will be considered only once. If reads are paired, the mate’s position also has to coincide to ignore a read.
 If set, only reads that have a mapping quality score of at least this are considered.
 By adding this option, reads are centered with respect to the fragment length. For paired-end data, the read is centered at the fragment length defined by the two ends of the fragment. For single-end data, the given fragment length is used. This option is useful to get a sharper signal around enriched regions.
 Include reads based on the SAM flag. For example, to get only reads that are the first mate, use a flag of 64. This is useful to count properly paired reads only once, as otherwise the second mate will be also considered for the coverage.
 Exclude reads based on the SAM flag. For example, to get only reads that map to the forward strand, use –samFlagExclude 16, where 16 is the SAM flag for reads that map to the reverse strand.

example usages: plotCoverage –bamfiles file1.bam file2.bam -out results.png

Usage Example:

$ plotCoverage -b H3K4Me1.bam H3K4Me3.bam H3K27Me3.bam H3K9Me3.bam
   --plotFile example_coverage
   -n 1000000
   -p 5\
   --plotTitle "example_coverage"\
   --minMappingQuality 10\
   --region 19

Example output plot: