Skip to main content

matplotlib_map_utils logo


Documentation: Available at https://moss-xyz.github.io/matplotlib-map-utils/

Source Code: Available on GitHub

Feedback: I welcome any and all feedback! See the Development Notes below for more details.

Current Version: v4.1.1, which fixed a a few bugs (see here for details!)


👋 Introduction

matplotlib_map_utils is a package that that assists with the creation of maps using matplotlib.

As of v4.x (the current version), this includes the ability to easily create three common map elements:

  • North arrows, which automatically point to true north,

  • Scale bars, available in different styles and automatic unit conversion, and

  • Inset maps, including both detail and extent-style plots.

The three elements listed above are all intended to be high-resolution, easily modifiable, and context-aware relative to your specific plot.

This package also contains a single utility object:

  • USA, a class that helps filter for states and territories within the USA based on given characteristics, used primarily for building queries based on FIPS codes or names.

Together, these allow for the (relatively) easy creation of a map such as the following:

Map with all common elements added


💾 Installation

This package is available on PyPi, and can be installed like so:

pip install matplotlib-map-utils
# or
uv add matplotlib-map-utils

The requirements for this package are:

  • python >= 3.10 (due to the use of the pipe operator to concatenate dictionaries and types)

  • matplotlib >= 3.9 (might work with lower versions but not guaranteed)

  • cartopy >= 0.23 (due to earlier bug with calling copy() on CRS objects)

  • pydantic >= 2.13.3 (for type validation; might work with older versions, open an issue if you have questions)


Quick Start and Usage Guides

For a primer on how to import the package and use the primary functions and methods to create elements, see the Quick Start guide.

Each part of the package also has a dedicated page that lays out usage and customisation options in more detail:

Finally, the Package Information page provides additional context around the development of and overall structure of the package.


Support and Contributions

If you notice something is not working as intended or if you'd like to add a feature yourself, I welcome PRs - just be sure to be descriptive as to what you are changing and why, including code examples!

If you are having issues using this script, feel free to leave a post explaining your issue, and I will try and assist, though I have no guaranteed SLAs as this is just a hobby project.

I am open to contributions, especially to help tackle the roadmap above!


⚖️ License

I know nothing about licensing, so I went with the GPL license. If that is incompatible with any of the dependencies, please let me know.

Metadata

Release files for matplotlib-map-utils 4.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matplotlib-map-utils 4.1.1
File Size Uploaded
matplotlib_map_utils-4.1.1.tar.gz 101.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for matplotlib-map-utils 4.1.1
File Interpreter ABI Platform
matplotlib_map_utils-4.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 187.6 kB

Release files / matplotlib_map_utils-4.1.1.tar.gz

Download URL matplotlib_map_utils-4.1.1.tar.gz
Size 101.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f5d01953ba217e206b212a2e41e4624912d16f96d79747e26987a664568cbf28
BLAKE2b-256 checksum
How to use checksums
133e1151d2f2bbca5c3ba61f2fe968e0b473202aa53303b88fd0179829edb018
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / matplotlib_map_utils-4.1.1-py3-none-any.whl

Download URL matplotlib_map_utils-4.1.1-py3-none-any.whl
Size 86.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee4eacb57300affb1dc518e379acdaae791ed198d659b0bc54b0c236dab7ff5c
BLAKE2b-256 checksum
How to use checksums
6e138105f24729e92f1741b3e8b39e2da4d6b5f85d1e224e59691350407b7b09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

4.1.1 This release

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.1.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page