1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
Plotting
========
If `matplotlib <http://matplotlib.sourceforge.net/>`_ is available, the functions ``plot`` and ``cplot`` in mpmath can be used to plot functions respectively as x-y graphs and in the complex plane. Also, ``splot`` can be used to produce 3D surface plots.
Function curve plots
-----------------------
.. image:: plot.png
Output of ``plot([cos, sin], [-4, 4])``
.. autofunction:: mpmath.plot
Complex function plots
-------------------------
.. image:: cplot.png
Output of ``fp.cplot(fp.gamma, points=100000)``
.. autofunction:: mpmath.cplot
3D surface plots
----------------
.. image:: splot.png
Output of ``splot`` for the donut example.
.. autofunction:: mpmath.splot
|