8000 Tidied up some of the documentation. by pelson · Pull Request #1918 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Tidied up some of the documentation. #1918

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 4 commits into from
Apr 26, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Further enhancements and simplifications.
  • Loading branch information
pelson committed Apr 26, 2013
commit abdf9a60b9b2f20d99ab1714145175de555693d6
33 changes: 32 additions & 1 deletion doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ ul.keywordmatches li.goodmatch a {

table.docutils {
border-spacing: 2px;
border: collapse;
border-collapse: collapse;
border-top-width: 1px;
border-right-width: 0px;
border-bottom-width: 1px;
Expand All @@ -535,3 +535,34 @@ table.docutils th {
table.docutils td {
border-width: 1px 0 1px 0;
}

#matplotlib-examples ul li{
font-size: large;
}

#matplotlib-examples ul li ul{
margin-bottom:20px;
overflow:hidden;
border-top:1px solid #ccc;
}

#matplotlib-examples ul li ul li {
font-size: small;
line-height:1.75em;
display:inline;
float: left;
width: 22em;
}

#overview ul li ul{
margin-bottom:20px;
overflow:hidden;
border-top:1px solid #ccc;
}

#overview ul li ul li {
display:inline;
float: left;
width: 30em;
}

47 changes: 41 additions & 6 deletions doc/_templates/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
{% extends "layout.html" %}
{% set title = 'matplotlib: python plotting' %}

{% block extrahead %}
<script>
function getSnippet(id, url) {
var req = false;
// For Safari, Firefox, and other non-MS browsers
if (window.XMLHttpRequest) {
try {
req = new XMLHttpRequest();
} catch (e) {
req = false;
}
} else if (window.ActiveXObject) {
// For Internet Explorer on Windows
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
req = false;
}
}
}
var element = document.getElementById(id);
if (req) {
// Synchronous request, wait till we have it all
req.open('GET', url, false);
req.send(null);
element.innerHTML = req.responseText;
}
}
</script>

{{ super() }}
{% endblock %}

{% block body %}

<h1>Introduction</h1>
Expand Down Expand Up @@ -132,12 +168,11 @@ <h4>Need help?</h4>

<h1>Toolkits</h1>

<p>There are several matplotlib add-on <a href="{{
pathto('mpl_toolkits/index') }}">toolkits</a>, including the projection
and mapping toolkit
<a href="http://matplotlib.github.com/basemap">basemap</a>, 3d plotting with <a href="{{
pathto('mpl_toolkits/mplot3d/index') }}">mplot3d</a>, axes and axis helpers in <a href="{{
pathto('mpl_toolkits/axes_grid/index') }}">axes_grid</a> and more.
<p>There are several matplotlib add-on <a href="{{ pathto('mpl_toolkits/index') }}">toolkits</a>,
including a choice of two projection and mapping toolkits <a href="http://matplotlib.org/basemap">basemap</a> and
<a href="http://scitools.org.uk/cartopy/docs/latest">cartopy</a>,
3d plotting with <a href="{{ pathto('mpl_toolkits/mplot3d/index') }}">mplot3d</a>,
axes and axis helpers in <a href="{{ pathto('mpl_toolkits/axes_grid/index') }}">axes_grid</a> and more.
</p>

<h1>Citing matplotlib</h1>
Expand Down
35 changes: 0 additions & 35 deletions doc/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,45 +1,10 @@
{% extends "!layout.html" %}

<script>
function getSnippet(id, url) {
var req = false;
// For Safari, Firefox, and other non-MS browsers
if (window.XMLHttpRequest) {
try {
req = new XMLHttpRequest();
} catch (e) {
req = false;
}
} else if (window.ActiveXObject) {
// For Internet Explorer on Windows
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
req = false;
}
}
}
var element = document.getElementById(id);
if (req) {
// Synchronous request, wait till we have it all
req.open('GET', url, false);
req.send(null);
element.innerHTML = req.responseText;
}
}
</script>

{% block rootrellink %}
<li><a href="{{ pathto('index') }}">home</a>|&nbsp;</li>
<li><a href="http://www.matplotlib.org/downloads.html">downloads</a>|&nbsp;</li>
<li><a href="{{ pathto('search') }}">search</a>|&nbsp;</li>
<li><a href="{{ pathto('examples/index') }}">examples</a>|&nbsp;</li>
<li><a href="{{ pathto('gallery') }}">gallery</a>|&nbsp;</li>
<li><a href="{{ pathto('api/pyplot_summary') }}">pyplot</a>|&nbsp;</li>
<li><a href="{{ pathto('citing') }}">citation</a>|&nbsp;</li>
<li><a href="{{ pathto('contents') }}">docs</a> &raquo;</li>
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion doc/api/matplotlib_configuration_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ The top level :mod:`matplotlib` module
======================================

.. automodule:: matplotlib
:members:
:members: rc, rcdefaults, use
:undoc-members:
:show-inheritance:
7 changes: 6 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
plot_formats = [('png', 80), ('hires.png', 200), ('pdf', 50)]

# Subdirectories in 'examples/' directory of package and titles for gallery
# TODO: Change to OrderedDict when Matplotlib drops support for Python < 2.7
mpl_example_sections = (
('lines_bars_and_markers', 'Lines, bars, and markers'),
('shapes_and_collections', 'Shapes and collections'),
Expand Down Expand Up @@ -251,3 +250,9 @@
'Matplotlib', "Python plotting package", 'Programming',
1),
]


################# numpydoc config ####################
numpydoc_show_class_members = False


41 changes: 24 additions & 17 deletions lib/matplotlib/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4726,9 +4726,10 @@ def legend(self, *args, **kwargs):
columnspacing the spacing between columns
================ ====================================================

.. Note:: Not all kinds of artist are supported by the legend command.
See LINK (FIXME) for details.
.. note::

Not all kinds of artist are supported by the legend command.
See :ref:`plotting-guide-legend` for details.

**Example:**

Expand Down Expand Up @@ -7346,9 +7347,11 @@ def pcolor(self, *args, **kwargs):
"""
Create a pseudocolor plot of a 2-D array.

Note: pcolor can be very slow for large arrays; consider
using the similar but much faster
:func:`~matplotlib.pyplot.pcolormesh` instead.
.. note::

pcolor can be very slow for large arrays; consider
using the similar but much faster
:func:`~matplotlib.pyplot.pcolormesh` instead.

Call signatures::

Expand Down Expand Up @@ -7471,14 +7474,16 @@ def pcolor(self, *args, **kwargs):

%(PolyCollection)s

Note: the default *antialiaseds* is False if the default
*edgecolors*="none" is used. This eliminates artificial lines
at patch boundaries, and works regardless of the value of
alpha. If *edgecolors* is not "none", then the default
*antialiaseds* is taken from
rcParams['patch.antialiased'], which defaults to *True*.
Stroking the edges may be preferred if *alpha* is 1, but
will cause artifacts otherwise.
.. note::

The default *antialiaseds* is False if the default
*edgecolors*="none" is used. This eliminates artificial lines
at patch boundaries, and works regardless of the value of
alpha. If *edgecolors* is not "none", then the default
*antialiaseds* is taken from
rcParams['patch.antialiased'], which defaults to *True*.
Stroking the edges may be preferred if *alpha* is 1, but
will cause artifacts otherwise.

.. seealso::

Expand Down Expand Up @@ -8865,10 +8870,12 @@ def specgram(self, x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
- *Pxx* is an array of shape `(len(times), len(freqs))` of power
- *im* is a :class:`~matplotlib.image.AxesImage` instance

Note: If *x* is real (i.e. non-complex), only the positive
spectrum is shown. If *x* is complex, both positive and
negative parts of the spectrum are shown. This can be
overridden using the *sides* keyword argument.
.. note::

If *x* is real (i.e. non-complex), only the positive
spectrum is shown. If *x* is complex, both positive and
negative parts of the spectrum are shown. This can be
overridden using the *sides* keyword argument.

Also note that while the plot is in dB, the *Pxx* array returned is
linear in power.
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/sankey.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def _add_output(self, path, angle, flow, length):
"""
Append an output to a path and return its tip and label locations.

Note: *flow* is negative for an output.
.. note:: *flow* is negative for an output.
"""
if angle is None:
return [0, 0], [0, 0]
Expand Down
0