Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for rectanular radius #126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexrashed
Copy link

@alexrashed alexrashed commented May 12, 2024

Currently it is not easily possible to create a rectangular shape from coordinates.
This PR simply extends the get_boundary function to also accept a tuple for the radius (to define "x-radius" and "y-radius").
This is a bit of a hacky solution, but I hacked it into my fork for a small project, and I thought it might make sense to file a PR.
Feel free to drop / close this PR if it's too hacky ;)

Here's a test-snippet for the barcelona example from the README:

from prettymaps import *
from matplotlib import pyplot as plt

plot(
    (41.39491,2.17557),
    radius=(500, 707),
    figsize=(8.27, 11.69),
    preset="barcelona",
    save_as=f'barcelona.svg'
)

This would result in the following image:
barcelona

Fixes #81

PS.: Thanks for this awesome OSS project! 馃槏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Portrait orientation of Barcelona example
1 participant