Skip to main content

Plot treemaps with figures and phylopics

Project description

figtreemap

Plot treemaps with figures. Source code, Docs.

Create treemaps with images proportional to the rectangles. This package focuses on getting and colouring phylopic SVGs but any PNG will work too.

🛠️ Installation

pip install figtreemap

🚀 Quick start

import matplotlib.pyplot as plt
import figtreemap

sizes = [30,4,450,700,190,1200,2,50,70,450,60]
names = ["Canis familiaris","Felis catus","Equus ferus","Bos taurus","Panthera leo","Giraffa camelopardalis","Oryctolagus cuniculus","Pan troglodytes","Homo sapiens","Ursus maritimus","Orycteropus afer"]

svgs = [figtreemap.phylopics.get_svg(name) for name in names]
imgs = [figtreemap.image_prep.prep_svg(svg) for svg in svgs]
figtreemap.squarify_images.figtreemap(sizes, imgs)
plt.show()

✨ Features

Python package to plot treemaps with figures.

  • Get phylopic SVG based on species name, if an image is not available the most specific available image for the lineage.
  • Prepare images for plotting with simple SVG editing and convertion to PNG.
  • Plot images in treemaps.

📄 Docs

Docs are hosted here with a step by step guide and API reference.

🐛 Troubleshooting

Please highlight bugs and ask questions as github issues.

🤝 Contributing

Please make requests and suggestions as github issues and if you would like to make an improvement yourself please submit a pull request.

⚖️ Licence

figtreemap is distributed under MIT licence.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

figtreemap-0.1.0.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

figtreemap-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file figtreemap-0.1.0.tar.gz.

File metadata

  • Download URL: figtreemap-0.1.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for figtreemap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7724f3196217d66044f81e7143d7cc7020b9f223c63045c026b93faa9d729429
MD5 5dc71f80a5dd77cf3ed20a6350e8c00b
BLAKE2b-256 9e8a01674ad6abd97afe8bde9274e093006a3e882d78054c04f9e5ba5797e558

See more details on using hashes here.

Provenance

The following attestation bundles were made for figtreemap-0.1.0.tar.gz:

Publisher: python-publish.yml on Quantitative-Omics-Research/figtreemap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file figtreemap-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: figtreemap-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for figtreemap-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d575bb32f22e2beea89134928f2e2ade22b63013638d29bc4595032a688ad75
MD5 9a7911be81ee834df78d438af0da3be8
BLAKE2b-256 ad3d45d65947a49e494c899779f390f66bd3ad6f331aa16b3c41507e63484f1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for figtreemap-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on Quantitative-Omics-Research/figtreemap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page