How to Read a Dot Plot
5 min read · Updated October 30, 2026
An alignment picks one best path through two sequences and discards everything inconsistent with it. A dot plot discards nothing: every stretch the two sequences share becomes a line, and where that line sits says what kind of relationship it is.
The fastest way to learn to read one is on a sequence whose structure you already know, so here is one built on purpose.
A sequence with a known structure
Take a 60 bp block A and a 38 bp block B, and build the 196 bp sequence A + B + A + reverse-complement(B). It contains one exact tandem-ish repeat (A appears twice, at 1–60 and 99–158) and one inverted repeat (B at 61–98, its reverse complement at 159–196).
Compared with itself, the plot comes back as five runs, with the word size chosen automatically as 10 from the sequence length.
- 1–196 against 1–196, same strand — the main diagonal, which is the sequence matching itself and carries no information.
- 1–60 against 99–158, same strand — the second copy of A.
- 99–158 against 1–60, same strand — the same relationship seen from the other side; a self-comparison is symmetric.
- 61–98 against 159–196, opposite strand — B against its own reverse complement.
- 159–196 against 61–98, opposite strand — again, the mirror of the line above.
What each kind of line means
A line parallel to the main diagonal is a repeat: the same sequence appearing twice, offset by the distance between the copies. The closer it lies to the main diagonal, the closer together the two copies are — a line a few bases off the diagonal is a tandem repeat, and a construct with one is a construct that can delete the stretch between the copies.
A line running the other way, on the falling diagonal, is an inversion or an inverted repeat. That is the feature a standard pairwise alignment does not report at all, because it cannot be part of a single consistent path through both sequences. An inverted repeat is also what folds into a hairpin, which is why this view and a secondary-structure prediction tend to find the same trouble.
A run that begins on the diagonal and steps sideways is an indel: the match continues, displaced by the length of the inserted or deleted segment.
Word size decides what you see, not what is there
The plot is built from exact word matches, and the word length sets how much chance matching appears. In a random sequence, a word of length k recurs about once every 4^k bases: an 8-mer has an expected 1 in 65,536 chance of appearing at any given position, which over two 200,000 bp sequences is about 610,000 chance matches.
Left blank, the word size is picked from the input lengths so that chance matches are rare — 10 for the 196 bp example above. Raise it when the plot looks like a grey wash, because density reads as homology to the eye whether or not it is any.
Lower it only when you are looking for a short, specific match and are prepared to read past the noise.
Comparing a sequence with itself
The self-comparison is the most useful version of this plot and the one people reach for last. The main diagonal is always there and always meaningless; everything else is the sequence's own internal structure.
Two practical questions it answers immediately: why a construct is unstable (direct repeats either side of a region are what recombination deletes), and why a primer has more than one binding site (because the site it binds is repeated).
Frequently asked questions
Why does an alignment miss a repeat that a dot plot shows?
Because an alignment returns one best path, so a second copy of a repeated region, a tandem duplication or an inverted segment is discarded to keep that path consistent. On a dot plot each of them is its own line, and an inversion — a run on the falling diagonal — is something a standard alignment typically does not report at all.
What does a line perpendicular to the main diagonal mean?
It is a match to the reverse complement: an inversion between two sequences, or an inverted repeat within one. The same sequence that produces that line is the sequence that can fold into a hairpin.
What word size should I use for a dot plot?
Leave it blank unless the plot is noisy. A word size chosen from the sequence lengths makes a chance match rare; a short word in long sequences produces thousands of coincidences, which the eye reads as a signal. Raising the word size removes short matches, so a genuinely short shared motif disappears too.
Why is the main diagonal always solid?
Because in a self-comparison every position matches itself. It is an artefact of the comparison, not a feature of the sequence, and the information in that plot is everything except the main diagonal.
Related references
Related tools
See repeats, duplications and inversions that a single best alignment hides.
Align two sequences with Needleman-Wunsch or Smith-Waterman.
Locate the exact direct repeats that let a construct recombine away the DNA between them, and build the shortened molecule you would actually recover.
Search for a motif you have, or discover one shared by a set of sequences.
Fold an RNA to its minimum-free-energy secondary structure — dot-bracket, MFE, base-pair list and an exportable arc diagram, with nothing to install.