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.1.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.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyplotflags-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 cf542ead358667ef1c698a36dbf71a4bffe025fe8af03b3f5b874e44fd97b72e
MD5 d72ab372f3fea726412618e8109c3417
BLAKE2b-256 1815570812c3d8107d76bd45cd445b713b4a73595e2d19fe51882ae4374ff36e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyplotflags-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 033e1ecbbbbe42246e8f959ba0873628c4c04016200b86b0b37e47517fc3cba8
MD5 90e97d04a0661de901e446a158ae1964
BLAKE2b-256 ae49bedc34666f0badd10e683884673a83103e09064ff7d8384de0253d755d1e

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