{ "info": { "author": "Michael R. Shannon", "author_email": "mrshannon.aerospace@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering", "Topic :: Software Development" ], "description": "contours - contour calculation with matplotlib\n---------------------------------------------------------\n\n.. begin-description\n\nThe `contours` package exposes Matplotlib's contour generators to the user\nproviding an equivalent of MATLAB's ``contourc`` function. This is done for\ngrids (including curvilinear) as well as unstructured data via Delaunay\ntriangulation (**FUTURE**).\n\nRegular contours can be returned as `NumPy`_ arrays or as `Shapely`_\nLineStrings and LinearRings. Filled contours can be returned as `NumPy`_\narrays or as `Shapely`_ Polygons.\n\nContour calculation without plotting is currently an open issue `#367`_ for\nMatplotlib. In that discussion, the type of hackery done in this library is\ndiscouraged by the Matplotlib developers. As of this writing there has been no\ndecision as to whether exposing contour calculations is a feature that should\nbe included in Matplotlib or not. If such a refactoring in Matplotlib ever\ntakes place, this library will be refactored to avoid using Matplotlib's\ninternal components.\n\n.. _Shapely: http://toblerity.org/shapely/manual.html\n\n.. _NumPy: http://www.numpy.org\n\n.. _#367: https://github.com/matplotlib/matplotlib/issues/367\n\n.. end-description\n\n\n.. begin-body\n\n.. begin-links\n\nLinks\n-----\n\n* `Download `_\n* `GitHub `_\n* `Documentation `_\n\n.. end-links\n\n.. begin-features\n\nFeatures\n--------\n\n* Filled and non-filled contours.\n* Contours on regular grids.\n* **TODO** Contours on unstructured data.\n\n.. end-features\n\n\nExamples\n--------\n\nA contrived example using `QuadContourGenerator` to compute the area and\ncircumference of a circle and a ring.\n\n>>> from contours.core import shapely_formatter as shapely_fmt\n>>> from contours.quad import QuadContourGenerator\n>>> import numpy as np\n>>> x = np.arange(-1, 1+0.01, 0.01)\n>>> y = np.arange(-1, 1+0.01, 0.01)\n>>> z = np.sqrt(x[:, np.newaxis]**2 + y[np.newaxis, :]**2)\n>>> c = QuadContourGenerator.from_rectilinear(x, y, z, shapely_fmt)\n>>> contour = c.filled_contour(max=1.0)\n>>> print('Area: {:0.2f}'.format(contour[0].area))\nArea: 3.14\n>>> print('Length: {:0.2f}'.format(contour[0].length))\nLength: 6.28\n>>> contour = c.filled_contour(min=0.5, max=1.0)\n>>> print('Area: {:0.2f}'.format(contour[0].area))\nArea: 2.36\n>>> print('Length: {:0.2f}'.format(contour[0].exterior.length))\nLength: 6.28\n>>> print('Length: {:0.2f}'.format(contour[0].interiors[0].length))\nLength: 3.14\n\n\n.. begin-author\n\nAuthor\n------\n\nThe `contours` module was written by Michael R. Shannon (`@mrshannon\n`_) in 2017.\n\nIt is maintained by:\n\n* Michael R. Shannon (`@mrshannon `_)\n 2017-\n\n.. end-author\n\nTesting\n-------\n\n**TODO**\n\n.. end-body", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/ccarocean/python-contours/archive/v0.0.2.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ccarocean/python-contours", "keywords": "math,plotting,matplotlib", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "contours", "package_url": "https://pypi.org/project/contours/", "platform": "any", "project_url": "https://pypi.org/project/contours/", "project_urls": { "Download": "https://github.com/ccarocean/python-contours/archive/v0.0.2.zip", "Homepage": "https://github.com/ccarocean/python-contours" }, "release_url": "https://pypi.org/project/contours/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Contour calculation with Matplotlib.", "version": "0.0.2" }, "last_serial": 3055779, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "674267524601614e3343ed6c7a158e8c", "sha256": "c9579e46ae9c2990362dc1e93b9832044e44f15c6dc968cfc8eaabe5b07e8f82" }, "downloads": -1, "filename": "contours-0.0.1.tar.gz", "has_sig": false, "md5_digest": "674267524601614e3343ed6c7a158e8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7094, "upload_time": "2017-07-25T11:47:47", "url": "https://files.pythonhosted.org/packages/28/28/ee2452712c7daa603044857286452c8058c95beb3aa167ccd2a00500861d/contours-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "ad32cec7adf1ecb64dab316fd8f1d827", "sha256": "31098980739adc76ab38e03cb987906935b2b45d24a2004e020c60509d6eb70e" }, "downloads": -1, "filename": "contours-0.0.2.tar.gz", "has_sig": false, "md5_digest": "ad32cec7adf1ecb64dab316fd8f1d827", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7403, "upload_time": "2017-07-28T14:02:14", "url": "https://files.pythonhosted.org/packages/55/3f/3df63de14b03a4421c50e6a7653da12118690e86bb391befb5c8bbb7e1f2/contours-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ad32cec7adf1ecb64dab316fd8f1d827", "sha256": "31098980739adc76ab38e03cb987906935b2b45d24a2004e020c60509d6eb70e" }, "downloads": -1, "filename": "contours-0.0.2.tar.gz", "has_sig": false, "md5_digest": "ad32cec7adf1ecb64dab316fd8f1d827", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7403, "upload_time": "2017-07-28T14:02:14", "url": "https://files.pythonhosted.org/packages/55/3f/3df63de14b03a4421c50e6a7653da12118690e86bb391befb5c8bbb7e1f2/contours-0.0.2.tar.gz" } ] }