Template:Phylogeny/APG IV/doc

This template produces phylogenetic trees based on the Angiosperm Phylogeny Group IV (APG IV). The whole system can be output as a large cladogram or sections can be selected for partial transclusion.

Partial transclusion is available for Magnolids, Monocots, Commelinids, Eudicots, Superrosids, Malvids, Fabids, Superasterids, Campulids, and Lamiids.

Full phylogenetic tree for APG IV system
To output the full system, use a plain transclusion of the template. The code

produces:

The same result can be achieved with:

or

Partial transclusion using named sections
Sections from the whole tree can be transcluded separately. For example, the following code extracts the monocot tree. The sections are marked in the template using  and. In this example the SECTION_NAME is Monocots. The wrap causes the transcluded section to be wrapped with an outer clade element labelled with the section name (by default) or the value assigned to the parameter.

Sections available
The following sections are currently available:
 * Angiosperms (full APG IV system)
 * Magnoliids
 * Monocots
 * Commelinids
 * Eudicots
 * Superrosids
 * Malvids
 * Fabids
 * Superasterids
 * Campulids
 * Lamiids

Partial transclusion using clade label parameters
Selective transclusion can also use the label parameters in the clade template. This method can be used with any clade with a label with no special encoding (sections or subtrees).

Note that the rosids tree includes the Fabids and Malvids, even though they are encoded using the subtrees FABIDS and MALVIDS.

Partial transclusion using clade subtrees
The subtrees attached to subtreeX can also be transcluded separately. This relies on the convention that subtrees have an uppercase target.

Note that this just retrieves the clade containing the malvids, without a labelled root. The following example uses wrap to wrap the recovered subtree within a clade with a label.

Using label
The following example extracts the rosid clade using the label parameter and then prunes the malvid clade using the exclude and substitutes with the content in the replace parameter.

Using subtree
The following example extracts the eudicot clade using the subtree parameter and then prunes the superrosid and superasterid clades using the exclude parameters and substitutes with the content in the replace parameters.

Using mixed labels and subtree
The following example extracts the eudicot clade using the subtree parameter and then prunes the rosid and lamiid clades using the exclude parameters and substitutes with the content in the replace parameters.

The final example extracts the whole angiosperm tree and prunes the magnoliid, monocot and eudicot clades to show the basal groups and main clades.