{ "info": { "author": "Simon Ratcliffe, Ludwig Schwardt", "author_email": "sratcliffe@ska.ac.za, ludwig@ska.ac.za", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Matplotlib HTML5 Canvas Backend\n===============================\n\nThis provides a web-delivered interactive matplotlib backend using HTML5\ntechnologies including `WebSocket`_ and the `Canvas`_ element.\n\nOur main goal is to have a backend that is consistent across multiple platforms,\nhas few installation dependencies, is easy and fast to animate, and retains\ncompatibility with current matplotlib usage scenarios.\n\nInstallation instructions can be found below or on the project's `Wiki`_ page.\nThe short answer::\n\n easy_install mplh5canvas\n\nFeatures\n--------\n\n- Pure Python\n- Uses mod_pywebsocket to provide multi-browser support through multiple websocket standards\n- Requires up-to-date web browser with Canvas and WebSocket support (since the start of 2013 the latest versions of all major browsers should work out of the box - see `Wiki`_ page for more details)\n- Designed with animation and interactivity in mind (resizable, zoomable,\n clickable regions, etc)\n- Simple plots (e.g. a 2048-point line plot) can be animated at around 60 frames\n per second\n- Allows proper remote access to plots\n- Allows multiple concurrent access to plots\n- Thumbnail window allows quick cycling between plots on a single page\n\nScreenshot\n----------\n\n.. image:: http://mplh5canvas.googlecode.com/files/screenshot.png\n :height: 600px\n\n.. _WebSocket: http://en.wikipedia.org/wiki/WebSocket\n.. _Canvas: http://en.wikipedia.org/wiki/Canvas_element\n.. _Wiki: http://code.google.com/p/mplh5canvas/wiki/Installation\n\n\nRequirements\n------------\n\nWe have tried to keep this module as free of dependencies as possible in order\nto open up the widest possible installation base. We do however depend\non the excellent `pywebsocket`_ code for handling our browser\ncommunications. This allows us to better track the WebSocket standard\nas it continues to evolve.\n\nThe current base system requirements prior to installation are:\n\n* Python 2.5, 2.6 or 2.7 (2.4 should also be OK, but has not been tested)\n* `matplotlib`_ 0.99.1.1 or newer (will be automatically installed if you are going the *easy_install mplh5canvas* route)\n* `pywebsocket`_ 0.6 or newer (will be automatically installed if you are going the *easy_install mplh5canvas* route)\n\nIf you want to make use of *easy_install* as suggested in the instructions below, you should install `setuptools`_. Alternatively you can use *pip* instead of *easy_install* by installing the `pip`_ Python package.\n\nThe web browser you use to display the plots must support Canvas and WebSocket\n(see http://caniuse.com/#feat=websockets for a summary of current WebSocket\nsupport). The status quo for the major browsers in July 2013 is:\n\n* **Chrome 9 and later** works out of the box and is the target browser (both desktop and mobile versions)\n\n* **Safari 5 and later** works out of the box (both Mac OS X and iOS versions)\n\n* **Firefox 4** works after unblocking WebSocket support:\n\n - Browse to the ``about:config`` preferences page and promise to be careful\n - Type ``websocket`` in the filter to find the right option\n - Double-click on ``network.websocket.override-security-block`` to set it to ``true``\n\n* **Firefox 5 to 10** is not supported due to a custom ``MozWebSocket`` class\n\n* **Firefox 11 and later** works out of the box\n\n* **Opera 11 to 12.02** works after unblocking WebSocket support:\n\n - Browse to the Preference Editor at the ``opera:config`` page\n - Type ``websocket`` in the \"Quick find\" search field to zoom in on the\n right option (\"Enable WebSockets\" under User Prefs)\n - Check the tickbox and click on the Save button\n\n* **Opera 12.10 and later** works out of the box\n\n* **Internet Explorer 10 and later** should work out of the box but is untested\n\n* **Opera Mini** and **Android Browser** have no WebSocket support yet and are therefore not supported\n\nnetifaces\n^^^^^^^^^\n\nIt is surprisingly difficult to make a good guess of the IP address of a user's\nprimary network interface across a range of operating systems. The code uses\n``socket.gethostbyname`` by default, which does a reasonable job but is\ncompletely borked if you have VMware installed.\n\nIf available it will use the `netifaces`_ module which generally does a better\njob. It is recommended that you install this by running::\n\n easy_install netifaces\n\nmod_pywebsocket\n^^^^^^^^^^^^^^^\n\nThis will be installed along with mplh5canvas if you follow the instructions below.\nHowever, you can install it yourself::\n\n easy_install mod_pywebsocket\n\nThe `mod_pywebsocket PyPI`_ page may be out of date as we maintain this ourselves. The master\nrepository for mod_pywebsocket is at `pywebsocket`_.\n\nInstallation\n------------\n\nSince this package is available on `PyPI`_ the simplest way to install it is to do::\n\n easy_install mplh5canvas\n\nAlternatively, install mod_pywebsocket yourself, download the latest mplh5canvas tarball (or check out the source code) from the `Google Code`_ page and do::\n\n python setup.py install\n\nIt is assumed that you have the proper permissions to install Python packages on\nyour system (if not, you can make use of `virtualenv`_ instead).\n\nTesting\n-------\n\nWe provide a number of example scripts for initial testing. Surprisingly these\nare found in the ``examples`` directory of the source code.\n\nThe script names are self-explanatory. The URL of the management server should be\nprinted out by the script, and if a web browser is installed and available a new\ntab should be opened in your browser. If not, then just copy and paste the\nmanagement URL into a browser window.\n\nConformance Testing\n^^^^^^^^^^^^^^^^^^^\n\nTo try and reach a level of reasonable conformance we have a crude test suite\nthat will run against a directory of matplotlib examples and produce a web page\nfor side-by-side comparison::\n\n cd tests\n python test.py -d /lib/mpl_examples/pylab_examples\n\nThis produces output files in the ``tests/output`` directory. The file ``test.html``\nwhen viewed in a web browser will show the mplh5canvas implementation alongside a\nPNG and SVG for each file in the target directory. \n\nBe aware that these test results can be pretty massive and may well lead to\nbrowser instability. You can run on a restricted set of tests by using a wildcard\nparameter (see ``test.py --help``).\n\nThere is also the option of rendering each canvas on the page to a PNG for easier\nside-by-side comparison. To do this, run::\n\n python rec.py\n\nonce you have a completed test run. At the bottom of the test.html page click\nthe \"Connect\" button. Then click the \"Put Images to Server\" button.\nThe ``rec.py`` instance should indicate a variety of files being written to disk.\nThen open the ``test_rendered.html`` page which will have a side-by-side column\nof PNGs.\n\n.. _pywebsocket: http://code.google.com/p/pywebsocket/\n.. _matplotlib: http://matplotlib.sourceforge.net/\n.. _setuptools: https://pypi.python.org/pypi/setuptools\n.. _pip: http://www.pip-installer.org/\n.. _netifaces: http://alastairs-place.net/netifaces/\n.. _mod_pywebsocket PyPI: https://pypi.python.org/pypi/mod_pywebsocket\n.. _PyPI: https://pypi.python.org/pypi/mplh5canvas\n.. _Google Code: https://code.google.com/p/mplh5canvas\n.. _virtualenv: https://pypi.python.org/pypi/virtualenv", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://code.google.com/p/mplh5canvas/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "mplh5canvas", "package_url": "https://pypi.org/project/mplh5canvas/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mplh5canvas/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://code.google.com/p/mplh5canvas/" }, "release_url": "https://pypi.org/project/mplh5canvas/0.7/", "requires_dist": null, "requires_python": null, "summary": "A matplotlib backend based on HTML5 Canvas.", "version": "0.7" }, "last_serial": 825633, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "e822d1f6f898757754f80b46bf3368b1", "sha256": "890f606af24b377d4f9cc3e1d4205b83cab6b1c3f7ee92794dc9bf93f226163c" }, "downloads": -1, "filename": "mplh5canvas-0.5-py2.5.egg", "has_sig": true, "md5_digest": "e822d1f6f898757754f80b46bf3368b1", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 103158, "upload_time": "2011-05-28T02:16:20", "url": "https://files.pythonhosted.org/packages/53/17/c144f5b96aa0ee8a8e35fd8d479380c9946304e96257c01f6cf99cc68c9f/mplh5canvas-0.5-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "de1a64e81a635d589e85dc33a229e4f7", "sha256": "bffd8423d399426f4c35354323a22f62f7f9d28f30ad07f2556ef2d3b92c6c70" }, "downloads": -1, "filename": "mplh5canvas-0.5.tar.gz", "has_sig": true, "md5_digest": "de1a64e81a635d589e85dc33a229e4f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 59815, "upload_time": "2011-05-28T02:14:32", "url": "https://files.pythonhosted.org/packages/b1/04/29c45a8d6ad9684ea4d4e8a216fe6a94f2870ee4ae3d66471b57d8f6f0d8/mplh5canvas-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "83d9c9d8da784391216b4dbe4813f7e8", "sha256": "f5af5c3849b98ff31d71b6432ba7e7632c27db21f87119daa22c28128f8514e8" }, "downloads": -1, "filename": "mplh5canvas-0.6.tar.gz", "has_sig": true, "md5_digest": "83d9c9d8da784391216b4dbe4813f7e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57660, "upload_time": "2011-10-25T15:49:03", "url": "https://files.pythonhosted.org/packages/ad/3f/0f826326a03261454d798f6c4ebe802594fa49f73f790c417b715d80ab06/mplh5canvas-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "771b283a839aa30ff4a58ebef413de8c", "sha256": "eac19bc812b391697f3807de7dc4f5d4b2db333789b728d891f8a2129ff12e35" }, "downloads": -1, "filename": "mplh5canvas-0.7.tar.gz", "has_sig": true, "md5_digest": "771b283a839aa30ff4a58ebef413de8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 63757, "upload_time": "2013-07-26T15:02:08", "url": "https://files.pythonhosted.org/packages/12/10/aefb00d1a8501ff56e2ec9d42926250569aafc7cf4f1e593034981f82134/mplh5canvas-0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "771b283a839aa30ff4a58ebef413de8c", "sha256": "eac19bc812b391697f3807de7dc4f5d4b2db333789b728d891f8a2129ff12e35" }, "downloads": -1, "filename": "mplh5canvas-0.7.tar.gz", "has_sig": true, "md5_digest": "771b283a839aa30ff4a58ebef413de8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 63757, "upload_time": "2013-07-26T15:02:08", "url": "https://files.pythonhosted.org/packages/12/10/aefb00d1a8501ff56e2ec9d42926250569aafc7cf4f1e593034981f82134/mplh5canvas-0.7.tar.gz" } ] }