-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC api's transition to sphinx-gallery is now complete #8311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,18 @@ | ||
matplotlib API | ||
.. _api_examples: | ||
|
||
Matplotlib API | ||
============== | ||
|
||
These examples use the matplotlib api rather than the pylab/pyplot | ||
These examples use the Matplotlib api rather than the pylab/pyplot | ||
procedural state machine. For robust, production level scripts, or | ||
for applications or web application servers, we recommend you use the | ||
matplotlib API directly as it gives you the maximum control over your | ||
Matplotlib API directly as it gives you the maximum control over your | ||
figures, axes and plottng commands. | ||
|
||
The example agg_oo.py is the simplest example of using the Agg backend | ||
which is readily ported to other output formats. This example is a | ||
good starting point if your are a web application developer. Many of | ||
the other examples in this directory use matplotlib.pyplot just to | ||
the other examples in this directory use ``matplotlib.pyplot`` just to | ||
create the figure and show calls, and use the API for everything else. | ||
This is a good solution for production quality scripts. For full | ||
fledged GUI applications, see the user_interfaces examples. | ||
|
||
Example style guide | ||
=================== | ||
|
||
If you are creating new examples, you cannot import pylab or import * | ||
from any module in your examples. The only three functions allowed | ||
from pyplot are "figure", "show" and "close", which you can use as | ||
convenience functions for managing figures. All other matplotlib | ||
functionality must illustrate the API. | ||
|
||
A simple example of the recommended style is:: | ||
|
||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
|
||
fig, ax = plt.subplots() | ||
ax.plot(np.random.rand(10)) | ||
ax.set_xlabel('some x data') | ||
ax.set_ylabel('some y data') | ||
ax.set_title('some title') | ||
ax.grid(True) | ||
fig.savefig('myfig') | ||
plt.show() |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to get rid of this section? It seems quite useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the correct place to document example style guide. We have a MEP for this in addition of contributors guidelines on how to write documentation (this section is thus quite out of date).
In addition, the READMEs are now being rendered in the gallery: they thus should contain documentation relevant to the end user on this specific section of the gallery instead of a mixture of user documentation and contribution guidelines.
Does this make sense?