Skip to content

Instantly share code, notes, and snippets.

@Guymer
Last active June 22, 2024 08:11
Show Gist options
  • Save Guymer/fe1a87da88e2139aff80d5215e4d3c25 to your computer and use it in GitHub Desktop.
Save Guymer/fe1a87da88e2139aff80d5215e4d3c25 to your computer and use it in GitHub Desktop.
a copy of the Cartopy example for drawing Tissot Circles
# This is the top-most EditorConfig file ...
root = true
# Configure all files ...
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true
# Configure Makefiles ...
[Makefile]
indent_style = tab
# OS generated files ...
.directory
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Hide compiled code ...
__pycache__
# Hide output of PyLint/ShellCheck ...
pylint.log
shellcheck.log
# Hide large datasets ...
*.png
[FORMAT]
expected-line-ending-format=LF
max-line-length=240
[MESSAGES CONTROL]
disable=bare-except,broad-exception-raised,c-extension-no-member,import-outside-toplevel,invalid-name,missing-module-docstring,too-many-arguments,too-many-branches,too-many-locals,too-many-nested-blocks,too-many-return-statements,too-many-statements
[TYPECHECK]
ignored-classes=boto3,cartopy,cython,ephem,exifread,geojson,lxml,magic,matplotlib,numpy,PIL,pygments,pyrfc3339,pytz,requests,scipy,shapefile,shapely,sysctl
ignored-modules=boto3,cartopy,cython,ephem,exifread,geojson,lxml,magic,matplotlib,numpy,PIL,pygments,pyrfc3339,pytz,requests,scipy,shapefile,shapely,sysctl
source=/Users/guymer/.bashrc

© British Crown copyright, 2016.

You may use and re-use the information featured on this website (not including logos) free of charge in any format or medium, under the terms of the Open Government Licence. We encourage users to establish hypertext links to this website.

Any email enquiries regarding the use and re-use of this information resource should be sent to: [email protected].

#!/usr/bin/env python3
"""
Tissot's Indicatrix
-------------------
Visualize Tissot's indicatrix on a map.
"""
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
def main():
fg = plt.figure(figsize = (10, 5))
ax = fg.add_subplot(1, 1, 1, projection = ccrs.PlateCarree())
# make the map global rather than have it zoom in to
# the extents of any plotted data
ax.set_global()
ax.stock_img()
ax.coastlines()
ax.tissot(facecolor = "orange", alpha = 0.4)
plt.show()
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment