mpl-flags


Namempl-flags JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/leejjoon/mpl-flags
Summary
upload_time2024-03-18 06:18:47
maintainer
docs_urlNone
authorJae-Joon Lee
requires_python
licenseBSD 3-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mpl-flags

National flags for Matplotlib.


## Flags data

`mpl-flags` contains the flag data in vector format readily usable with
Matplotlib. The original flags data are in svg format, and are converted to
matplotlib's `Path` data using `mpl-simple-svg-parser`. `mpl-flags` does not
contain the original svg files, only the converted data in numpy format
(vertices and codes).

The flag data is collected from various sources. Currently, it includes flags from

1. Google's noto color emoji font : https://github.com/googlefonts/noto-emoji
2. circle-flags : https://github.com/HatScripts/circle-flags
3. flag-icons : https://github.com/lipis/flag-icons

Different sources can render the flags differently.

## Usage

```python
from mpl_flags import Flags

flags = Flags("noto_waved") # You initialize the Flags class specifying what kind of
                            # flags you like to use.
                            # `noto_waved` is flags from google's noto emoji fonts.

fig, ax = plt.subplots(figsize=(3, 3))
flags.show_flag(ax, "KR")
```

```python
from matplotlib.offsetbox import AnnotationBbox

flags = Flags("noto_original")

fig, ax = plt.subplots(figsize=(3, 3))
da = flags.get_drawing_area("KR", wmax=100)
ab = AnnotationBbox(da, (0.5, 0.5), frameon=True,
                    box_alignment=(0.5, 0.5))
ax.add_artist(ab)
```

## Installation

You can install using `pip`:

```bash
pip install mpl_flags
```

## Development Installation


```bash
pip install -e ".[dev]"
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/leejjoon/mpl-flags",
    "name": "mpl-flags",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Jae-Joon Lee",
    "author_email": "lee.j.joon@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "# mpl-flags\n\nNational flags for Matplotlib.\n\n\n## Flags data\n\n`mpl-flags` contains the flag data in vector format readily usable with\nMatplotlib. The original flags data are in svg format, and are converted to\nmatplotlib's `Path` data using `mpl-simple-svg-parser`. `mpl-flags` does not\ncontain the original svg files, only the converted data in numpy format\n(vertices and codes).\n\nThe flag data is collected from various sources. Currently, it includes flags from\n\n1. Google's noto color emoji font : https://github.com/googlefonts/noto-emoji\n2. circle-flags : https://github.com/HatScripts/circle-flags\n3. flag-icons : https://github.com/lipis/flag-icons\n\nDifferent sources can render the flags differently.\n\n## Usage\n\n```python\nfrom mpl_flags import Flags\n\nflags = Flags(\"noto_waved\") # You initialize the Flags class specifying what kind of\n                            # flags you like to use.\n                            # `noto_waved` is flags from google's noto emoji fonts.\n\nfig, ax = plt.subplots(figsize=(3, 3))\nflags.show_flag(ax, \"KR\")\n```\n\n```python\nfrom matplotlib.offsetbox import AnnotationBbox\n\nflags = Flags(\"noto_original\")\n\nfig, ax = plt.subplots(figsize=(3, 3))\nda = flags.get_drawing_area(\"KR\", wmax=100)\nab = AnnotationBbox(da, (0.5, 0.5), frameon=True,\n                    box_alignment=(0.5, 0.5))\nax.add_artist(ab)\n```\n\n## Installation\n\nYou can install using `pip`:\n\n```bash\npip install mpl_flags\n```\n\n## Development Installation\n\n\n```bash\npip install -e \".[dev]\"\n```\n\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause",
    "summary": "",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/leejjoon/mpl-flags"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3cb453f60fac7a296a269543ace9be30c05504e1c3b5f9f38c484355563904ac",
                "md5": "e8378ccb130205d01c5300fae833bf5b",
                "sha256": "e25a2df1d2da1131a235dfefec87512e763843e65bae1923c2a568a8346cc0b1"
            },
            "downloads": -1,
            "filename": "mpl_flags-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e8378ccb130205d01c5300fae833bf5b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 15237186,
            "upload_time": "2024-03-18T06:18:47",
            "upload_time_iso_8601": "2024-03-18T06:18:47.364850Z",
            "url": "https://files.pythonhosted.org/packages/3c/b4/53f60fac7a296a269543ace9be30c05504e1c3b5f9f38c484355563904ac/mpl_flags-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-18 06:18:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "leejjoon",
    "github_project": "mpl-flags",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mpl-flags"
}
        
Elapsed time: 0.23577s