https://github.com/certik/jsplot
https://github.com/certik/jsplot
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/certik/jsplot
- Owner: certik
- License: mit
- Created: 2010-06-17T00:14:01.000Z (about 16 years ago)
- Default Branch: master
- Last Pushed: 2010-11-19T05:49:56.000Z (over 15 years ago)
- Last Synced: 2025-03-27T16:37:17.022Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 340 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
JSPlot
======
JSPlot is a library with Matplotlib like API, except that the ``show()``
command launches a web server and you interact with the plot in the web
browser.
Simple example::
>>> from jsplot import plot, show
>>> plot([1, 2, 3], [1, 2, 1])
>>> show()
Server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
More complicated example::
>>> from numpy import arange, pi, sin
>>> from jsplot import plot, show
>>> x = arange(0, 3*pi, 0.01)
>>> plot(x, sin(x*sin(x)), label="sin(x*sin(x))")
>>> plot(x, sin(x), label="sin(x)")
>>> show()
Server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Going to the url above will show something like the following screenshot, where
you can interactively zoom in/out.
.. image:: https://github.com/certik/jsplot/raw/master/doc/jsplot1.png
Development
-----------
To develop the plotserver, do::
cd plotserver
./manage.py runserver
To develop the jsplot itself, just edit files in the ``jsplot`` directory.