Skip to content

Commit

Permalink
* Remove matplotlib.legend from artist_api.rst since it is document i…
Browse files Browse the repository at this point in the history
…n legend_api

* Fix pyplot docstring :module: -> :mod to remove error: Unknown interpreted text role "module".

* Fix pyplot tight_layout docstring to get rid of 'Unexpected section title.' error

* reformatted docstring in tight_layout.auto_adjust_subplotpars

* fix what's new bullet list ends w/o blank line issues

* remove plotting.rst and arraydata.rst stub docs

* Added environment_variables.rst to FAQ index

* removed normed warning on Axes.hist

* fix an nxutils.point_inside_poly docstring definition list bug
  • Loading branch information
jdh2358 committed Sep 29, 2011
1 parent 0c7f83d commit 2b7ce9e
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 266 deletions.
7 changes: 0 additions & 7 deletions doc/api/artist_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ artists
:undoc-members:
:show-inheritance:

:mod:`matplotlib.legend`
=============================

.. automodule:: matplotlib.legend
:members:
:undoc-members:
:show-inheritance:

:mod:`matplotlib.lines`
=============================
Expand Down
2 changes: 2 additions & 0 deletions doc/faq/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ The Matplotlib FAQ
usage_faq.rst
howto_faq.rst
troubleshooting_faq.rst
environment_variables_faq.rst

1 change: 1 addition & 0 deletions doc/matplotlibrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ docstring.hardcopy : True # set this when you want to generate hardcopy docstri

#examples.download : False # False to bypass downloading mechanism
#examples.directory : /your/path/to/sample_data/ # directory to look in if download is false

72 changes: 0 additions & 72 deletions doc/users/arraydata.rst

This file was deleted.

155 changes: 0 additions & 155 deletions doc/users/plotting.rst

This file was deleted.

2 changes: 2 additions & 0 deletions doc/users/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ as 2D plotting, Ben Root has made several improvements to the
* Most 3D plotting functions now support empty inputs

* Ticker offset display added:

.. plot:: mpl_examples/mplot3d/offset_demo.py

* :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.contourf`
gains *zdir* and *offset* kwargs. You can now do this:

.. plot:: mpl_examples/mplot3d/contourf3d_demo2.py

Numerix support removed
Expand Down
12 changes: 1 addition & 11 deletions lib/matplotlib/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2067,7 +2067,7 @@ def grid(self, b=None, which='major', axis='both', **kwargs):
*axis* can be 'both' (default), 'x', or 'y' to control which
set of gridlines are drawn.
*kawrgs* are used to set the grid line properties, eg::
*kwargs* are used to set the grid line properties, eg::
ax.grid(color='r', linestyle='-', linewidth=2)
Expand Down Expand Up @@ -7662,16 +7662,6 @@ def hist(x, bins=10, range=None, normed=False, weights=None,
db = np.diff(bins)
m = (m.astype(float) / db) / m.sum()
n.append(m)
if normed and db.std() > 0.01 * db.mean():
warnings.warn("""
This release fixes a normalization bug in the NumPy histogram
function prior to version 1.5, occuring with non-uniform
bin widths. The returned and plotted value is now a density:
n / (N * bin width),
where n is the bin count and N the total number of points.
""")



if cumulative:
slc = slice(None)
Expand Down
7 changes: 4 additions & 3 deletions lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1310,10 +1310,11 @@ def get_tightbbox(self, renderer):


def tight_layout(self, renderer=None, pad=1.2, h_pad=None, w_pad=None):
"""Adjust subplot parameters to give specified padding.
"""
Adjust subplot parameters to give specified padding.
Parameters:
Parameters
----------
pad : float
padding between the figure edge and the edges of subplots, as a fraction of the font-size.
h_pad, w_pad : float
Expand Down
7 changes: 4 additions & 3 deletions lib/matplotlib/gridspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,11 @@ def locally_modified_subplot_params(self):


def tight_layout(self, fig, renderer=None, pad=1.2, h_pad=None, w_pad=None, rect=None):
"""Adjust subplot parameters to give specified padding.
"""
Adjust subplot parameters to give specified padding.
Parameters
----------
Parameters:
pad : float
padding between the figure edge and the edges of subplots, as a fraction of the font-size.
h_pad, w_pad : float
Expand Down
9 changes: 5 additions & 4 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def draw():
A more object-oriented alternative, given any
:class:`~matplotlib.figure.Figure` instance, :attr:`fig`, that
was created using a :module:`~matplotlib.pyplot` function, is::
was created using a :mod:`~matplotlib.pyplot` function, is::
fig.canvas.draw()
Expand Down Expand Up @@ -1035,10 +1035,11 @@ def subplot_tool(targetfig=None):


def tight_layout(pad=1.2, h_pad=None, w_pad=None):
"""Adjust subplot parameters to give specified padding.
"""
Adjust subplot parameters to give specified padding.
Parameters:
Parameters
----------
pad : float
padding between the figure edge and the edges of subplots, as a fraction of the font-size.
h_pad, w_pad : float
Expand Down
28 changes: 18 additions & 10 deletions lib/matplotlib/tight_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,28 @@ def auto_adjust_subplotpars(fig, renderer,
Return a dictionary of subplot parameters so that spacing between
subplots are adjusted. Note that this function ignore geometry
information of subplot itself, but uses what is given by
nrows_ncols and num1num2_list parameteres. Also, the results could be
incorrect if some subplots have adjustable=datalim.
*nrows_ncols* and *num1num2_list* parameteres. Also, the results could be
incorrect if some subplots have ``adjustable=datalim``.
Parameters
----------
nrows_ncols : number of rows and number of columns of the grid.
num1num2_list : list of numbers specifying the area occupied by the subplot
subplot_list : list of subplots that will be used to calcuate optimal subplot_params.
Parameters:
nrows_ncols
number of rows and number of columns of the grid.
num1num2_list
list of numbers specifying the area occupied by the subplot
subplot_list
list of subplots that will be used to calcuate optimal subplot_params.
pad : float
padding between the figure edge and the edges of subplots, as a fraction of the font-size.
padding between the figure edge and the edges of subplots, as a fraction of the font-size.
h_pad, w_pad : float
padding (height/width) between edges of adjacent subplots.
padding (height/width) between edges of adjacent subplots.
Defaults to `pad_inches`.
rect : [left, bottom, right, top] in normalized (0, 1) figure coordinates.
rect
[left, bottom, right, top] in normalized (0, 1) figure coordinates.
"""


Expand Down
2 changes: 1 addition & 1 deletion src/nxutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static PyMethodDef module_methods[] = {
"Return a boolean ndarray, True for points inside the polygon.\n\n"
"*xypoints*\n a sequence of N x,y pairs.\n"
"*xyverts*\n sequence of x,y vertices of the polygon.\n"
"*mask* an ndarray of length N.\n\n"
"*mask*\n an ndarray of length N.\n\n"
"A point on the boundary may be treated as inside or outside.\n"
"See `pnpoly <http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html>`_\n"},
{NULL} /* Sentinel */
Expand Down

0 comments on commit 2b7ce9e

Please sign in to comment.