Skip to content

Commit 62d2836

Browse files
committed
Merge branch 'master' of github.com:sandialabs/toyplot
2 parents ed32ea1 + bcbcfd3 commit 62d2836

39 files changed

+9578
-1300
lines changed

conda.recipe/bld.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python setup.py install

conda.recipe/meta.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package:
2+
name: toyplot
3+
version: {{ environ['GIT_DESCRIBE_TAG'] }}
4+
5+
source:
6+
git_url: ../
7+
8+
build:
9+
script: python setup.py install
10+
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
11+
12+
requirements:
13+
build:
14+
- setuptools
15+
- colormath
16+
- multipledispatch
17+
- numpy >=1.7
18+
run:
19+
- colormath
20+
- multipledispatch
21+
- numpy >=1.7
22+
23+
24+
about:
25+
home: http://github.com/sandialabs/toyplot
26+
license: BSD
27+
summary: A modern plotting toolkit supporting electronic publishing and reproducibility.
28+

design/embedding.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

design/qt-embedding.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Note: we prefer PyQt5 only because we've had issues embedding our HTML output
2+
# with specific versions (Qt 4.8.7 on a Mac) of QWebView. Otherwise, the
3+
# functionality is equivalent.
4+
5+
try:
6+
from PyQt5.QtWidgets import *
7+
from PyQt5.QtWebKitWidgets import *
8+
except:
9+
from PySide.QtGui import *
10+
from PySide.QtWebKit import *
11+
12+
import numpy
13+
import sys
14+
import toyplot.html, toyplot.png, toyplot.svg
15+
import xml.etree.ElementTree as xml
16+
17+
application = QApplication(sys.argv)
18+
window = QWebView()
19+
20+
canvas, axes, mark = toyplot.plot(numpy.linspace(0, 1) ** 2)
21+
22+
# Embed Toyplot HTML output in a QWebView. This is the best option because it
23+
# retains figure interaction.
24+
window.setHtml(xml.tostring(toyplot.html.render(canvas), method="html"))
25+
26+
# Embed Toyplot SVG in a QWebView. This retains the figure quality, but no
27+
# interaction.
28+
#window.setContent(xml.tostring(toyplot.svg.render(canvas)), "image/svg+xml")
29+
30+
# Embed Toyplot PNG in a QWebView. This requires additional Python
31+
# dependencies, doesn't scale cleanly, and has no interaction.
32+
#window.setContent(toyplot.png.render(canvas), "image/png")
33+
34+
#window.settings().setAttribute(QWebSettings.DeveloperExtrasEnabled, True)
35+
window.show()
36+
application.exec_()

design/series-labels.ipynb

Lines changed: 0 additions & 267 deletions
This file was deleted.

docs/canvas-layout.rst

Lines changed: 165 additions & 67 deletions
Large diffs are not rendered by default.

docs/cartesian-axes.rst

Lines changed: 184 additions & 72 deletions
Large diffs are not rendered by default.

docs/color.rst

Lines changed: 92 additions & 36 deletions
Large diffs are not rendered by default.

docs/compatibility.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. _compatibility:
2+
3+
.. image:: ../artwork/toyplot.png
4+
:width: 200px
5+
:align: right
6+
7+
Compatibility
8+
=============
9+
10+
A quick disclaimer on backwards-compatibility for Toyplot users:
11+
12+
Toyplot follows the `Semantic Versioning <http://semver.org>`_ standard for
13+
assigning version numbers in a way that has specific meaning. As of this
14+
writing Toyplot releases are still in the `0.y.z` development phase, which
15+
means (among other things) that the API may change at any time. We try not to
16+
be abusive about it, and in practice there have been very few breaking changes
17+
in Toyplot's history, but they can and will happen on the road to the 1.0
18+
release, and you should be prepared for it.
19+
20+

docs/contributing.rst

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,6 @@ Coding Style
3535
The Toyplot source code follows the `PEP-8 Style Guide for Python Code <http://legacy.python.org/dev/peps/pep-0008>`_,
3636
except that we use two spaces for indentation instead of four.
3737

38-
Code Walkthrough
39-
----------------
40-
41-
Most of Toyplot's public API is located in `toyplot/__init__.py` ... for most
42-
contributations, that's where you'll start. If you're adding a new type of
43-
visualization, you'll need to create a new :class:`toyplot.Mark` derivative
44-
there. Then, you'll create factory methods for creating instances of your
45-
new mark in :class:`toyplot.axes.Cartesian` and/or :class:`toyplot.canvas.Canvas`. Once
46-
you've done that, you'll need to write code to render your new mark
47-
in `toyplot/svg.py`. That's it ... all of the other backends are rendered
48-
from the SVG representation.
49-
5038
Running Regression Tests
5139
------------------------
5240

@@ -66,7 +54,7 @@ Writing Regression Tests
6654
Toyplot is in the midst of a transition from `nose <https://nose.readthedocs.org/en/latest/>`_
6755
to `behave <http://pythonhosted.org/behave>`_ for running regression tests. New tests should
6856
be added to the `features` directory using behave. The following outlines how the old tests
69-
were written, and wll remain as a reference until they are all replaced.
57+
were written, and will remain as a reference until they are all replaced.
7058

7159
Existing tests are located in `tests/tests.py`.
7260

0 commit comments

Comments
 (0)