Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_build/
savefig/
4 changes: 2 additions & 2 deletions cheatsheet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ document.

You can also reference classes, modules, functions, etc that are
documented using the sphinx `autodoc
<http://sphinx.pocoo.org/ext/autodoc.html>`_ facilites. For example,
see the module :mod:`matplotlib.backend_bases` documentation, or the
<https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html>`_ facilites.
For example, see the module :mod:`matplotlib.backend_bases` documentation, or the
class :class:`~matplotlib.backend_bases.LocationEvent`, or the method
:meth:`~matplotlib.backend_bases.FigureCanvasBase.mpl_connect`.

Expand Down
3 changes: 1 addition & 2 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['matplotlib.sphinxext.only_directives',
'matplotlib.sphinxext.plot_directive',
extensions = ['matplotlib.sphinxext.plot_directive',
'IPython.sphinxext.ipython_directive',
'IPython.sphinxext.ipython_console_highlighting',
'sphinx.ext.mathjax',
Expand Down
2 changes: 1 addition & 1 deletion custom_look.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Customizing the look and feel of the site
******************************************

The `sphinx <http://www.sphinx-doc.org>`_ site itself looks better than
The `sphinx <https://www.sphinx-doc.org/en/master/>`_ site itself looks better than
the sites created with the default css, so here we'll
invoke T. S. Eliot's maxim "Talent imitates, but genius steals" and
grab their css and part of their layout. As before, you can either
Expand Down
7 changes: 3 additions & 4 deletions extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ And then we tell it what extensions to load::

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['matplotlib.sphinxext.only_directives',
'matplotlib.sphinxext.plot_directive',
extensions = ['matplotlib.sphinxext.plot_directive',
'IPython.sphinxext.ipython_directive',
'IPython.sphinxext.ipython_console_highlighting',
'sphinx.ext.mathjax',
Expand Down Expand Up @@ -187,8 +186,8 @@ produces this output:


See the matplotlib `pyplot tutorial
<https://matplotlib.org/users/pyplot_tutorial.html>`_ and
the `gallery <https://matplotlib.org/gallery.html>`_ for
<https://matplotlib.org/stable/tutorials/introductory/pyplot.html#sphx-glr-tutorials-introductory-pyplot-py>`_
and the `gallery <https://matplotlib.org/stable/gallery/index.html>`_ for
lots of examples of matplotlib plots.

Inheritance diagrams
Expand Down
4 changes: 2 additions & 2 deletions getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Getting started
Installing your doc directory
=============================

You may already have sphinx `sphinx <http://sphinx.pocoo.org/>`_
You may already have sphinx `sphinx <https://www.sphinx-doc.org/en/master/>`_
installed -- you can check by doing::

python -c 'import sphinx'
Expand Down Expand Up @@ -102,5 +102,5 @@ with::

Next we'll customize the look and feel of our site to give it a logo,
some custom css, and update the navigation panels to look more like
the `sphinx <http://sphinx.pocoo.org/>`_ site itself -- see
the `sphinx <https://www.sphinx-doc.org/en/master/>`_ site itself -- see
:ref:`custom_look`.
1 change: 1 addition & 0 deletions ipython_directive.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ be renumbered in the rendered docs, and pick up where the block above
left off.

.. ipython::
:okexcept:

In [1]: z = x * 3 # x is recalled from previous block

Expand Down
35 changes: 35 additions & 0 deletions make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
13 changes: 7 additions & 6 deletions pyplots/ellipses.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
from pylab import *
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
import numpy as np

delta = 45.0 # degrees

angles = arange(0, 360+delta, delta)
angles = np.arange(0, 360 + delta, delta)
ells = [Ellipse((1, 1), 4, 2, a) for a in angles]

a = subplot(111, aspect='equal')
a = plt.subplot(111, aspect='equal')

for e in ells:
e.set_clip_box(a.bbox)
e.set_alpha(0.1)
a.add_artist(e)

xlim(-2, 4)
ylim(-1, 3)
plt.xlim(-2, 4)
plt.ylim(-1, 3)

show()
plt.show()