Browse Source

Merge branch 'website' of github.com:Kozea/pygal into website

pull/127/head
Florian Mounier 11 years ago
parent
commit
4658ded307
  1. 5
      pages/download.rst
  2. 2
      pages/home.rst
  3. 83
      pages/interpolations.rst

5
pages/download.rst

@ -23,6 +23,9 @@ You can also download `the development snapshot from github <http://github.com/K
Linux Distribution Packages Linux Distribution Packages
=========================== ===========================
*Not packaged yet.* Pygal has been packaged for:
- `Fedora <https://admin.fedoraproject.org/pkgdb/acls/name/python-pygal>`_ by ralph
- `Gentoo <http://packages.gentoo.org/package/dev-python/pygal>`_ by Ben de Groot
If you are interested in creating packages for Linux distributions, `contact us </support/>`_. If you are interested in creating packages for Linux distributions, `contact us </support/>`_.

2
pages/home.rst

@ -101,8 +101,6 @@ Optional dependencies
PNG output requires `CairoSVG <http://cairosvg.org/>`_, `tinycss <http://packages.python.org/tinycss/>`_ and `cssselect <http://packages.python.org/cssselect/>`_. PNG output requires `CairoSVG <http://cairosvg.org/>`_, `tinycss <http://packages.python.org/tinycss/>`_ and `cssselect <http://packages.python.org/cssselect/>`_.
Install those with ``pip install CairoSVG tinycss cssselect``. Install those with ``pip install CairoSVG tinycss cssselect``.
Interpolations need the `scipy <http://www.scipy.org/>`_ python module.
Unit testing needs `py.test <http://pytest.org/latest/>`_ or `nosetests <http://readthedocs.org/docs/nose/en/latest/>`_. Unit testing needs `py.test <http://pytest.org/latest/>`_ or `nosetests <http://readthedocs.org/docs/nose/en/latest/>`_.
Visual testing is based on `flask <http://flask.pocoo.org/>`_. Visual testing is based on `flask <http://flask.pocoo.org/>`_.

83
pages/interpolations.rst

@ -9,22 +9,6 @@ Interpolations
.. contents:: .. contents::
Interpolations need the `scipy python module <http://www.scipy.org/>`_.
To enable it just specify the interpolation type to:
- linear
- nearest
- zero
- slinear
- quadratic
- cubic
- krogh
- barycentric
- univariate
- or an integer representing the order of the spline interpolator
For more info see `interp1d definition on scipy <http://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html#scipy.interpolate.interp1d>`_
Without interpolation: Without interpolation:
---------------------- ----------------------
@ -46,17 +30,74 @@ With cubic interpolation:
chart = pygal.Line(interpolate='cubic') chart = pygal.Line(interpolate='cubic')
chart.add('line', [1, 5, 17, 12, 5, 10]) chart.add('line', [1, 5, 17, 12, 5, 10])
With krogh interpolation:
------------------------- With quadratic interpolation:
-----------------------------
``interpolate``
.. pygal-code::
chart = pygal.Line(interpolate='quadratic')
chart.add('line', [1, 5, 17, 12, 5, 10])
With lagrange interpolation:
----------------------------
``interpolate``
.. pygal-code::
chart = pygal.Line(interpolate='lagrange')
chart.add('line', [1, 5, 17, 12, 5, 10])
With trigonometric interpolation:
---------------------------------
``interpolate`` ``interpolate``
.. pygal-code:: .. pygal-code::
chart = pygal.Line(interpolate='krogh') chart = pygal.Line(interpolate='trigonometric')
chart.add('line', [1, 5, 17, 12, 5, 10]) chart.add('line', [1, 5, 17, 12, 5, 10])
With hermite interpolation:
---------------------------
``interpolate``
.. pygal-code::
chart = pygal.Line(interpolate='hermite')
chart.add('line', [1, 5, 17, 12, 5, 10])
For hermite you can also pass additionnal parameters to configure tangent behaviour:
.. pygal-code::
chart = pygal.Line(interpolate='hermite', interpolation_parameters={'type': 'finite_difference'})
chart.add('line', [1, 5, 17, 12, 5, 10])
.. pygal-code::
chart = pygal.Line(interpolate='hermite', interpolation_parameters={'type': 'cardinal', 'c': .75})
chart.add('line', [1, 5, 17, 12, 5, 10])
.. pygal-code::
chart = pygal.Line(interpolate='hermite', interpolation_parameters={'type': 'kochanek_bartels', 'b': -1, 'c': 1, 't': 1})
chart.add('line', [1, 5, 17, 12, 5, 10])
For more information see the `wikipedia article <http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Finite_difference>`_
Interpolation precision Interpolation precision
----------------------- -----------------------
@ -67,12 +108,12 @@ You can change the resolution of the interpolation with the help of `interpolati
.. pygal-code:: .. pygal-code::
chart = pygal.Line(interpolate='krogh', interpolation_precision=15) chart = pygal.Line(interpolate='quadratic')
chart.add('line', [1, 5, 17, 12, 5, 10]) chart.add('line', [1, 5, 17, 12, 5, 10])
.. pygal-code:: .. pygal-code::
chart = pygal.Line(interpolate='krogh', interpolation_precision=50) chart = pygal.Line(interpolate='quadratic', interpolation_precision=3)
chart.add('line', [1, 5, 17, 12, 5, 10]) chart.add('line', [1, 5, 17, 12, 5, 10])

Loading…
Cancel
Save