Dotplots are used to determine the percent similarity between two sequences, usually DNA or protein, but are also used for whole genome alignments to detect syntenic regions. Each axis of a dotplot represents the linear arrangement of one sequence being compared. A short segment of one sequence (also called window size) is compared with all possible segments of the same length in the second sequence. This generates a matrix of several alignments between the two sequences. For each pair of alignments, the similarity between the sequences' residues is scored based on the probability with which the various pairs of aligned residues replace one another. If the similarity between any two segments exceeds a threshold value, then a positive score is registered, and a dot is displayed in the dotplot. Weak signals of homology could also be detected by manipulating this threshold value.