Skip to content

xiejx5/geoplots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Geoplots

A library for geographic plotting and visualization, built on top of Matplotlib and Cartopy.

Installation

You can install the package using pip:

pip install geoplots

Usage

Initialization

Initialize a figure with a custom grid:

from geoplots import wrapper

fig, grids = wrapper.init(figsize=(10, 6), widths=[1, 2], heights=[1, 1])

Geographical Plots

Create plots with specific boundaries:

import matplotlib.pyplot as plt
from geoplots import bound
import cartopy.crs as ccrs

fig = plt.figure(figsize=(10, 5))
ax = fig.add_subplot(111, projection=ccrs.Robinson())
bound.robinson_bound(ax)

Icon Grids (Waffle Charts)

Create waffle charts with icons:

from geoplots.icongrid import Waffle

data = {'Cats': 30, 'Dogs': 25, 'Birds': 10}
fig = plt.figure(
    FigureClass=Waffle,
    rows=5,
    values=data,
    legend={'loc': 'upper left', 'bbox_to_anchor': (1.1, 1)}
)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages