-
Notifications
You must be signed in to change notification settings - Fork 0
Visualization
The principal visualization interface in PhyloGeoPlot is PhyloGeoPlotter.
It combines a phylogenetic tree with geographic occurrence data and can optionally display an environmental raster.
from phylogeoplot.visualisation.tree_to_map_raster import PhyloGeoPlotter
plotter = PhyloGeoPlotter(
nwk_file="sequences_tree.nwk",
gps_file="coordinates.csv",
offset_file="offsets.csv",
raster_file="environment.tif",
raster_band=1,
)
plotter.plot()
plotter.save(output_dir="output")Raster input is optional.
A tree-map visualization can be generated without an environmental layer when only phylogenetic and geographic occurrence information is required.
PhyloGeoPlot places the phylogenetic tree and geographic map within a common figure and draws connections between corresponding phylogenetic and geographic elements.
This allows the viewer to examine:
- phylogenetic relationships;
- geographic distribution;
- correspondence between tree tips and mapped records;
- optional trait information;
- optional environmental context.
Quantitative traits can be represented using a continuous color scale.
The same encoding can be applied across:
- tree elements;
- occurrence points;
- connecting lines.
When a GeoTIFF raster is supplied, PhyloGeoPlot can display an environmental background layer behind occurrence points.
Typical examples include:
- elevation;
- precipitation;
- temperature;
- vegetation indices;
- other continuous environmental variables.
Raster bands can be selected with the raster_band parameter.
The displayed map extent can be adjusted to focus on the study area.
Offset values can be provided to improve visual separation of tree nodes, labels, or connecting lines.
plotter.plot()plotter.save(output_dir="output")Depending on the configured workflow, figures may be exported as:
- PNG;
- SVG;
- PDF.
https://github.com/tahiri-lab/PhyloGeoPlot/tree/main/images
See Examples for complete walkthroughs.
Please email us at: Nadia.Tahiri@USherbrooke.ca for any questions or feedback.