{ "info": { "author": "Joe Kington", "author_email": "joferkington@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "mpldatacursor\n=============\n``mpldatacursor`` provides interactive \"data cursors\" (clickable annotation\nboxes) for matplotlib. \n\nMajor Changes in v0.6\n---------------------\nVersion 0.6 adds:\n\n* Better handling of date-formatted axes.\n\n* \"Popup\" text boxes can be interactively hidden by right-clicking\n (controllable through the ``hide_button`` and ``display_button`` kwargs).\n\n* Proper support for twinned axes.\n\n* Better unicode support for the formatter function. Note that this makes\n ``mpldatacursor`` incompatibile with early 3.x versions (3.0, 3.1, and 3.2).\n However, it remains compatible with Python >= 3.3 (e.g. 3.3, 3.4, and 3.5) as\n well as 2.6 and 2.7.\n\n* Annotation boxes will now try to stay visible inside the figure by default.\n Specify ``keep_inside=False`` to disable this.\n\n* Added basic support for extracting the z-value of 3D artists.\n\n* Made the precision of the default x & y formatting depend on the range of the\n axes.\n\n* Full support for interactive IPython notebooks through the nbagg backend.\n Note that the performance on the nbagg may be very poor.\n\n* Full support for matplotlib 1.5.x, Python 3.5, and Qt5 (in v0.6.2).\n\n* Numerous bugfixes (Thanks to everyone for the reports!).\n\nBasic Usage\n-----------\n``mpldatacursor`` offers a few different styles of interaction through the \n``datacursor`` function. \n\nAs an example, this displays the x, y coordinates of the selected artist in an\nannotation box::\n\n import matplotlib.pyplot as plt\n import numpy as np\n from mpldatacursor import datacursor\n\n data = np.outer(range(10), range(1, 5))\n\n fig, ax = plt.subplots()\n lines = ax.plot(data)\n ax.set_title('Click somewhere on a line')\n\n datacursor(lines)\n\n plt.show()\n\n.. image:: http://joferkington.github.com/mpldatacursor/images/basic.png\n :align: center\n :target: https://github.com/joferkington/mpldatacursor/blob/master/examples/basic.py\n\nIf no artist or sequence of artists is specified, all manually plotted artists\nin all axes in all figures will be activated. (This can be limited to only\ncertain axes by passing in an axes object or a sequence of axes to the ``axes``\nkwarg.)\n\nAs an example (the output is identical to the first example)::\n\n import matplotlib.pyplot as plt\n import numpy as np\n from mpldatacursor import datacursor\n\n data = np.outer(range(10), range(1, 5))\n\n plt.plot(data)\n plt.title('Click somewhere on a line')\n\n datacursor()\n\n plt.show()\n\nHiding Annotation Boxes and Toggling Interactivity\n--------------------------------------------------\nTo hide a specific annotation box, right-click on it (Customizable through the\n``hide_button`` kwarg). To hide all annotation boxes, press \"d\" on the\nkeyboard. (Think of \"delete\". \"h\" was taken by matplotlib's default key for\n\"home\".) To disable or re-enable interactive datacursors, press \"t\" (for\n\"toggle\"). These keys can be customized through the ``keybindings`` kwarg. \n\nControlling the Displayed Text\n------------------------------\nThe displayed text can be controlled either by using the ``formatter`` kwarg, \nwhich expects a function that accepts an arbitrary sequence of kwargs and\nreturns the string to be displayed. Often, it's convenient to pass in the\n``format`` method of a template string (e.g. \n``formatter=\"longitude:{x:.2f}\\nlatitude{y:.2f}\".format``).\n\nAs an example of using the ``formatter`` kwarg to display only the label of the\nartist instead of the x, y coordinates::\n\n import numpy as np\n import matplotlib.pyplot as plt\n from mpldatacursor import datacursor\n\n x = np.linspace(0, 10, 100)\n\n fig, ax = plt.subplots()\n ax.set_title('Click on a line to display its label')\n\n # Plot a series of lines with increasing slopes...\n for i in range(1, 20):\n ax.plot(x, i * x, label='$y = {}x$'.format(i))\n\n # Use a DataCursor to interactively display the label for a selected line...\n datacursor(formatter='{label}'.format)\n\n plt.show()\n\n.. image:: http://joferkington.github.com/mpldatacursor/images/show_artist_labels.png\n :align: center\n :target: https://github.com/joferkington/mpldatacursor/blob/master/examples/show_artist_labels.py\n\nWorking with Images\n-------------------\n``datacursor`` will also display the array value at the selected point in an\nimage. This example also demonstrates using the ``display=\"single\"`` option to\ndisplay only one data cursor instead of one-per-axes.::\n\n import matplotlib.pyplot as plt\n import numpy as np\n from mpldatacursor import datacursor\n\n data = np.arange(100).reshape((10,10))\n\n fig, axes = plt.subplots(ncols=2)\n axes[0].imshow(data, interpolation='nearest', origin='lower')\n axes[1].imshow(data, interpolation='nearest', origin='upper',\n extent=[200, 300, 400, 500])\n datacursor(display='single')\n\n fig.suptitle('Click anywhere on the image')\n\n plt.show()\n\n.. image:: http://joferkington.github.com/mpldatacursor/images/image_example.png\n :align: center\n :target: https://github.com/joferkington/mpldatacursor/blob/master/examples/image_example.py\n\nDraggable Boxes\n---------------\nIf ``draggable=True`` is specified, the annotation box can be interactively\ndragged to a new position after creation.\n\nAs an example (This also demonstrates using the ``display='multiple'`` kwarg)::\n\n import matplotlib.pyplot as plt\n import numpy as np\n from mpldatacursor import datacursor\n\n data = np.outer(range(10), range(1, 5))\n\n fig, ax = plt.subplots()\n ax.set_title('Try dragging the annotation boxes')\n ax.plot(data)\n\n datacursor(display='multiple', draggable=True)\n\n plt.show()\n\n.. image:: http://joferkington.github.com/mpldatacursor/images/draggable_example.png\n :align: center\n :target: https://github.com/joferkington/mpldatacursor/blob/master/examples/draggable_example.py\n\nFurther Customization\n---------------------\nAdditional keyword arguments to ``datacursor`` are passed on to ``annotate``.\nThis allows one to control the appearance and location of the \"popup box\",\narrow, etc. Note that properties passed in for the ``bbox`` and ``arrowprops``\nkwargs will be merged with the default style. Therefore, specifying things\nlike ``bbox=dict(alpha=1)`` will yield an opaque, yellow, rounded box, instead\nof matplotlib's default blue, square box. As a basic example::\n\n import matplotlib.pyplot as plt\n import numpy as np\n from mpldatacursor import datacursor\n\n fig, axes = plt.subplots(ncols=2)\n\n left_artist = axes[0].plot(range(11))\n axes[0].set(title='No box, different position', aspect=1.0)\n\n right_artist = axes[1].imshow(np.arange(100).reshape(10,10))\n axes[1].set(title='Fancy white background')\n\n # Make the text pop up \"underneath\" the line and remove the box...\n dc1 = datacursor(left_artist, xytext=(15, -15), bbox=None)\n\n # Make the box have a white background with a fancier connecting arrow\n dc2 = datacursor(right_artist, bbox=dict(fc='white'),\n arrowprops=dict(arrowstyle='simple', fc='white', alpha=0.5))\n\n plt.show()\n\n.. image:: http://joferkington.github.com/mpldatacursor/images/change_popup_color.png\n :align: center\n :target: https://github.com/joferkington/mpldatacursor/blob/master/examples/change_popup_color.py\n\nHighlighting Selected Lines\n---------------------------\n``HighlightingDataCursor`` highlights a ``Line2D`` artist in addition to\ndisplaying the selected coordinates.::\n\n import numpy as np\n import matplotlib.pyplot as plt\n from mpldatacursor import HighlightingDataCursor\n\n x = np.linspace(0, 10, 100)\n\n fig, ax = plt.subplots()\n\n # Plot a series of lines with increasing slopes...\n lines = []\n for i in range(1, 20):\n line, = ax.plot(x, i * x, label='$y = {}x$'.format(i))\n lines.append(line)\n\n HighlightingDataCursor(lines)\n\n plt.show()\n\n.. image:: http://joferkington.github.com/mpldatacursor/images/highlighting_example.png\n :align: center\n :target: https://github.com/joferkington/mpldatacursor/blob/master/examples/highlighting_example.py\n\nInstallation\n------------\n``mpldatacursor`` can be installed from PyPi using\n``easy_install``/``pip``/etc. (e.g. ``pip install mpldatacursor``) or you may\ndownload the source and install it directly with ``python setup.py install``.\n\n", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/joferkington/mpldatacursor/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "mpldatacursor", "package_url": "https://pypi.org/project/mpldatacursor/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mpldatacursor/", "project_urls": { "Homepage": "https://github.com/joferkington/mpldatacursor/" }, "release_url": "https://pypi.org/project/mpldatacursor/0.6.2/", "requires_dist": [ "matplotlib (>=0.9)", "numpy (>=1.1)" ], "requires_python": null, "summary": "Interactive data cursors for Matplotlib", "version": "0.6.2" }, "last_serial": 1954114, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "05ef7deb14cd65c4f6a0fbf82aab8eea", "sha256": "39572d7a7399634b07fcb6278fede9ecb39a2113e9cfb06a09689ae55efadd19" }, "downloads": -1, "filename": "mpldatacursor-0.1.tar.gz", "has_sig": false, "md5_digest": "05ef7deb14cd65c4f6a0fbf82aab8eea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3979, "upload_time": "2013-02-22T04:10:18", "url": "https://files.pythonhosted.org/packages/d4/96/79b61f29f6a1fceac6b946cb0166a5442a52096641bdb916bc711ec86d27/mpldatacursor-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "d8746efe92577262e98803c58381a3bf", "sha256": "57426a2139f19bf3e23ff5a63fa40ceff093796ba7e8e98bd75eb36ce3a6929f" }, "downloads": -1, "filename": "mpldatacursor-0.2.tar.gz", "has_sig": false, "md5_digest": "d8746efe92577262e98803c58381a3bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7252, "upload_time": "2013-03-11T03:25:05", "url": "https://files.pythonhosted.org/packages/ad/9d/c712c3ca2227e6b2b1db1fd91da873ba02f7b431ae0680845f184af76ef8/mpldatacursor-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "6317086c559bb6c0ff865bdd44d14e74", "sha256": "5b4c0894fdee8748df8f8b81f71b72443476a8e4d6c0ba7fc78b66f1711032f9" }, "downloads": -1, "filename": "mpldatacursor-0.2.1.tar.gz", "has_sig": false, "md5_digest": "6317086c559bb6c0ff865bdd44d14e74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7252, "upload_time": "2013-03-13T02:29:22", "url": "https://files.pythonhosted.org/packages/61/28/86f121af42d171348d2335321cf0f857d2167c9055c2af16ec1bb1a0a484/mpldatacursor-0.2.1.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "bc7dd2728264fdf8ca3ee448871b1cba", "sha256": "ed26ad6b31609f09bfe0679164355b85db98ba6ac4f57db8f8cd2011b8a69b2f" }, "downloads": -1, "filename": "mpldatacursor-0.3.tar.gz", "has_sig": false, "md5_digest": "bc7dd2728264fdf8ca3ee448871b1cba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9156, "upload_time": "2013-05-19T15:01:52", "url": "https://files.pythonhosted.org/packages/5b/d7/88d14f0eef0c28bec522c6e9cb4098254453681cae91164c444075089792/mpldatacursor-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "9c2623b3e6b818d4f24eac00b3cfb53d", "sha256": "96b33f8485ce6ee30c6acdb940850c9387fe7df2259504bffd278cce6416ade1" }, "downloads": -1, "filename": "mpldatacursor-0.4.tar.gz", "has_sig": false, "md5_digest": "9c2623b3e6b818d4f24eac00b3cfb53d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10840, "upload_time": "2013-07-29T01:51:18", "url": "https://files.pythonhosted.org/packages/98/68/e382e1c76eaaad6edb141fd1f74b5ae20179d47c9fb4c2a263c9a8cb2e15/mpldatacursor-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "8f2120f4c6578d80b0e378bbdf6f8a1d", "sha256": "5a471719d9d2886d5eeedd29f6a2721c9f03e3185f987514f4723c5aa086ce1c" }, "downloads": -1, "filename": "mpldatacursor-0.4.1.tar.gz", "has_sig": false, "md5_digest": "8f2120f4c6578d80b0e378bbdf6f8a1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10790, "upload_time": "2013-08-21T03:32:47", "url": "https://files.pythonhosted.org/packages/6b/49/d8badf86ca936cf8406bdde189f730ebce16ba6fce86abe6766d227520e5/mpldatacursor-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "26f8b19ad0f5db90c5a7aeadc8ea5541", "sha256": "89e01b5aef64a8a1e71d5a6ba603c945fa110ad4ef86681610b14ca83c0139f5" }, "downloads": -1, "filename": "mpldatacursor-0.4.2.tar.gz", "has_sig": false, "md5_digest": "26f8b19ad0f5db90c5a7aeadc8ea5541", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14448, "upload_time": "2013-12-24T04:02:16", "url": "https://files.pythonhosted.org/packages/3e/3e/9a74ef1fa4e142f5fedac93b2e552950a865b08266ead9c5a399bbafe122/mpldatacursor-0.4.2.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "6038e0e35c2db7cc1d43f453c1342a0a", "sha256": "e0764a2a70c0f8c14af0a2940ae833db7977a0359d42f23d62760ad15cf46778" }, "downloads": -1, "filename": "mpldatacursor-0.5.tar.gz", "has_sig": false, "md5_digest": "6038e0e35c2db7cc1d43f453c1342a0a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17922, "upload_time": "2014-01-06T05:12:28", "url": "https://files.pythonhosted.org/packages/43/fb/f0ce0dcbb3cb42f61b8eb707362ff31c80facbc64dd7f5e6c2ed8a7b7921/mpldatacursor-0.5.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "15b4243b0a06477faae7f3cd852f71a1", "sha256": "0e5b95908fb1efbfb44f19cea2b4e566e809b8fcc0adbe288ba3dd8a80edb560" }, "downloads": -1, "filename": "mpldatacursor-0.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "15b4243b0a06477faae7f3cd852f71a1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27051, "upload_time": "2015-08-16T21:24:00", "url": "https://files.pythonhosted.org/packages/0b/a8/8584f07eb61b2807cc2249449978ad10b848444fde2e462776b9d5fa4cbe/mpldatacursor-0.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "66cb990843d7ec3611f3e0fb113053d1", "sha256": "23fcccaa7f31834365b98e80f302117ee63dd38f8ff71dab09005256857a7f50" }, "downloads": -1, "filename": "mpldatacursor-0.6.0.tar.gz", "has_sig": false, "md5_digest": "66cb990843d7ec3611f3e0fb113053d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22296, "upload_time": "2015-08-16T21:24:07", "url": "https://files.pythonhosted.org/packages/59/a3/df064783aae4f23a658290471ddbbbdfae5c0e9ba6128eced5a70b3f8f9c/mpldatacursor-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "114116adc73f708eb26521c6c90cdc27", "sha256": "12768074352397943e772cef0e9bbb56bb06f0a9480805096a4b71cfdd5129fc" }, "downloads": -1, "filename": "mpldatacursor-0.6.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "114116adc73f708eb26521c6c90cdc27", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27060, "upload_time": "2015-08-16T21:54:55", "url": "https://files.pythonhosted.org/packages/b2/47/83d161c30d64e3f2df4ac7c76a895a062cc68b9b115400b09ee84d172395/mpldatacursor-0.6.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "979d779cfb7d7b85ea234fb5ae9323ba", "sha256": "156dc422d5ddf666043e99a695cae8e9de1fded5ca2f519e64ff4186640fc3cc" }, "downloads": -1, "filename": "mpldatacursor-0.6.1.tar.gz", "has_sig": false, "md5_digest": "979d779cfb7d7b85ea234fb5ae9323ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22303, "upload_time": "2015-08-16T21:54:59", "url": "https://files.pythonhosted.org/packages/cc/28/adcb64cb4a0655b4b50778b13b37b91204dd54f5ed6e3fa2b30b43f549a2/mpldatacursor-0.6.1.tar.gz" } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "eb5fbea684b20f1e3d0e64f82cca6ed6", "sha256": "699c0d6cd7c7562f6076c00bd654218c9fa7a35ccb627216737cf0876fb5cca6" }, "downloads": -1, "filename": "mpldatacursor-0.6.2-py2-none-any.whl", "has_sig": false, "md5_digest": "eb5fbea684b20f1e3d0e64f82cca6ed6", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 27559, "upload_time": "2016-02-13T04:03:05", "url": "https://files.pythonhosted.org/packages/e1/f1/14b1fbc3c432653d3305e856b7256437e6a1e1f1850568ef82cd5a3105c8/mpldatacursor-0.6.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ea205e78799ed7e29a574cef2b0152b7", "sha256": "eadaad6d8b240a93398d5f57a64cf1e63719eedbd8178890b7d7de470290d85a" }, "downloads": -1, "filename": "mpldatacursor-0.6.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ea205e78799ed7e29a574cef2b0152b7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 27562, "upload_time": "2016-02-13T04:03:14", "url": "https://files.pythonhosted.org/packages/fe/29/d7bc0337c6d396583c9e49da5474ed5c86738a5731ca4465987ae4399dcf/mpldatacursor-0.6.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2b616e94f594b81774dea40d2cebcbc3", "sha256": "086d71317ac3b986492229c921bca45f8795b105637cfafa50c31f8d5c9c0ef0" }, "downloads": -1, "filename": "mpldatacursor-0.6.2.tar.gz", "has_sig": false, "md5_digest": "2b616e94f594b81774dea40d2cebcbc3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22831, "upload_time": "2016-02-13T04:03:20", "url": "https://files.pythonhosted.org/packages/d9/ac/46a1ec8567f6ef379444c184f9e85fb17e11c87491fddf963d8ebe13e648/mpldatacursor-0.6.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "eb5fbea684b20f1e3d0e64f82cca6ed6", "sha256": "699c0d6cd7c7562f6076c00bd654218c9fa7a35ccb627216737cf0876fb5cca6" }, "downloads": -1, "filename": "mpldatacursor-0.6.2-py2-none-any.whl", "has_sig": false, "md5_digest": "eb5fbea684b20f1e3d0e64f82cca6ed6", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 27559, "upload_time": "2016-02-13T04:03:05", "url": "https://files.pythonhosted.org/packages/e1/f1/14b1fbc3c432653d3305e856b7256437e6a1e1f1850568ef82cd5a3105c8/mpldatacursor-0.6.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ea205e78799ed7e29a574cef2b0152b7", "sha256": "eadaad6d8b240a93398d5f57a64cf1e63719eedbd8178890b7d7de470290d85a" }, "downloads": -1, "filename": "mpldatacursor-0.6.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ea205e78799ed7e29a574cef2b0152b7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 27562, "upload_time": "2016-02-13T04:03:14", "url": "https://files.pythonhosted.org/packages/fe/29/d7bc0337c6d396583c9e49da5474ed5c86738a5731ca4465987ae4399dcf/mpldatacursor-0.6.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2b616e94f594b81774dea40d2cebcbc3", "sha256": "086d71317ac3b986492229c921bca45f8795b105637cfafa50c31f8d5c9c0ef0" }, "downloads": -1, "filename": "mpldatacursor-0.6.2.tar.gz", "has_sig": false, "md5_digest": "2b616e94f594b81774dea40d2cebcbc3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22831, "upload_time": "2016-02-13T04:03:20", "url": "https://files.pythonhosted.org/packages/d9/ac/46a1ec8567f6ef379444c184f9e85fb17e11c87491fddf963d8ebe13e648/mpldatacursor-0.6.2.tar.gz" } ] }