Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6030485

Browse files
authored
Merge pull request #8311 from NelleV/MEP12_api
[MRG+2] DOC api's transition to sphinx-gallery is now complete
2 parents 6c49f24 + a17c6a1 commit 6030485

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+21
-41
lines changed

doc/faq/howto_faq.rst

Lines changed: 2 additions & 2 deletions

doc/users/legend_guide.rst

Lines changed: 1 addition & 1 deletion

doc/users/prev_whats_new/whats_new_1.1.rst

Lines changed: 4 additions & 3 deletions

doc/users/prev_whats_new/whats_new_1.4.rst

Lines changed: 1 addition & 1 deletion

doc/users/prev_whats_new/whats_new_1.5.rst

Lines changed: 1 addition & 1 deletion

doc/users/screenshots.rst

Lines changed: 2 additions & 2 deletions

doc/users/transforms_tutorial.rst

Lines changed: 1 addition & 1 deletion

examples/api/README.txt

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,18 @@
1-
matplotlib API
1+
.. _api_examples:
2+
3+
Matplotlib API
24
==============
35

4-
These examples use the matplotlib api rather than the pylab/pyplot
6+
These examples use the Matplotlib api rather than the pylab/pyplot
57
procedural state machine. For robust, production level scripts, or
68
for applications or web application servers, we recommend you use the
7-
matplotlib API directly as it gives you the maximum control over your
9+
Matplotlib API directly as it gives you the maximum control over your
810
figures, axes and plottng commands.
911

1012
The example agg_oo.py is the simplest example of using the Agg backend
1113
which is readily ported to other output formats. This example is a
1214
good starting point if your are a web application developer. Many of
13-
the other examples in this directory use matplotlib.pyplot just to
15+
the other examples in this directory use ``matplotlib.pyplot`` just to
1416
create the figure and show calls, and use the API for everything else.
1517
This is a good solution for production quality scripts. For full
1618
fledged GUI applications, see the user_interfaces examples.
17-
18-
Example style guide
19-
===================
20-
21-
If you are creating new examples, you cannot import pylab or import *
22-
from any module in your examples. The only three functions allowed
23-
from pyplot are "figure", "show" and "close", which you can use as
24-
convenience functions for managing figures. All other matplotlib
25-
functionality must illustrate the API.
26-
27-
A simple example of the recommended style is::
28-
29-
import numpy as np
30-
import matplotlib.pyplot as plt
31-
32-
fig, ax = plt.subplots()
33-
ax.plot(np.random.rand(10))
34-
ax.set_xlabel('some x data')
35-
ax.set_ylabel('some y data')
36-
ax.set_title('some title')
37-
ax.grid(True)
38-
fig.savefig('myfig')
39-
plt.show()
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)