Skip to main content

A matplotlib extension to replace scatterplot points with circular country flags.

Project description

PyPlotFlags

A python alternative for ggflags R package. Creates a scatterplot where points are replaced by circular country flags.

Usasge

Installation

pip install pyplotflags

Core Function

flagscatterplot(x, y, country_codes, ax=None, zoom=0.1, flag_dir=DEFAULT_FLAG_DIR, **kwargs)

Parameters: - x, y: Arrays of coordinates. - country_codes: Array of ISO Alpha-2 country codes (same length as x and y). - ax: Matplotlib axes object (uses current axes if None). - zoom: Scaling factor for the flag images. - flag_dir: Directory containing the .png flag images. - **kwargs: Standard matplotlib keyword args for scatterplots

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

pyplotflags-0.1.2.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

pyplotflags-0.1.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file pyplotflags-0.1.2.tar.gz.

File metadata

  • Download URL: pyplotflags-0.1.2.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pyplotflags-0.1.2.tar.gz
Algorithm Hash digest
SHA256 cb776d4ca236420e12d332ed92d88ea0bb439bc08fc46d3d54f0f23000904df2
MD5 588367c3dd9588340296e6763e17c2cf
BLAKE2b-256 d0239279a137a92016161695528237ea37e4ac1bc5a5c366e52b1c2fab91e534

See more details on using hashes here.

File details

Details for the file pyplotflags-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyplotflags-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pyplotflags-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d510169f9056920af5b4b31c298b50b547805bb67f3983b0d67c5a47bea6362a
MD5 fe5afb923caed303ba217b923f26b2e0
BLAKE2b-256 a7819f5506deb90c8517aa3f9243157acdf1d5c1c5ead095c886c24e138f1eee

See more details on using hashes here.

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