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

Skip to content

Commit ce7521d

Browse files
committed
Lots of docstring formatting fixes.
svn path=/trunk/matplotlib/; revision=5593
1 parent a053c24 commit ce7521d

12 files changed

Lines changed: 1515 additions & 1170 deletions

File tree

doc/faq/installing_faq.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ Easy Install
5555

5656
easy_install -m PackageName
5757

58-
3. Delete any .egg files or directories from your `installation directory
59-
<locating-matplotlib-install>`.
58+
3. Delete any .egg files or directories from your :ref:`installation
59+
directory <locating-matplotlib-install>`.
6060

6161

6262
Windows installer

lib/matplotlib/__init__.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -684,11 +684,11 @@ def rc_params(fail_on_error=False):
684684

685685
def rc(group, **kwargs):
686686
"""
687-
Set the current rc params. Group is the grouping for the rc, eg
688-
for lines.linewidth the group is 'lines', for axes.facecolor, the
689-
group is 'axes', and so on. Group may also be a list or tuple
690-
of group names, eg ('xtick','ytick'). kwargs is a list of
691-
attribute name/value pairs, eg::
687+
Set the current rc params. Group is the grouping for the rc, eg.
688+
for ``lines.linewidth`` the group is ``lines``, for
689+
``axes.facecolor``, the group is ``axes``, and so on. Group may
690+
also be a list or tuple of group names, eg. (*xtick*, *ytick*).
691+
*kwargs* is a dictionary attribute name/value pairs, eg::
692692
693693
rc('lines', linewidth=2, color='r')
694694
@@ -728,7 +728,8 @@ def rc(group, **kwargs):
728728
rc('font', **font) # pass in the font dict as kwargs
729729
730730
This enables you to easily switch between several configurations.
731-
Use rcdefaults to restore the default rc params after changes.
731+
Use :func:`~matplotlib.pyplot.rcdefaults` to restore the default
732+
rc params after changes.
732733
"""
733734

734735
aliases = {
@@ -756,7 +757,7 @@ def rc(group, **kwargs):
756757
def rcdefaults():
757758
"""
758759
Restore the default rc params - the ones that were created at
759-
matplotlib load time
760+
matplotlib load time.
760761
"""
761762
rcParams.update(rcParamsDefault)
762763

lib/matplotlib/artist.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -707,40 +707,41 @@ def get(o, *args, **kwargs):
707707

708708
def setp(h, *args, **kwargs):
709709
"""
710-
matplotlib supports the use of setp ("set property") and getp to set
711-
and get object properties, as well as to do introspection on the
712-
object For example, to set the linestyle of a line to be dashed, you
713-
can do
710+
matplotlib supports the use of :func:`setp` ("set property") and
711+
:func:`getp` to set and get object properties, as well as to do
712+
introspection on the object. For example, to set the linestyle of a
713+
line to be dashed, you can do::
714714
715715
>>> line, = plot([1,2,3])
716716
>>> setp(line, linestyle='--')
717717
718718
If you want to know the valid types of arguments, you can provide the
719-
name of the property you want to set without a value
719+
name of the property you want to set without a value::
720720
721721
>>> setp(line, 'linestyle')
722722
linestyle: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]
723723
724724
If you want to see all the properties that can be set, and their
725-
possible values, you can do
725+
possible values, you can do::
726726
727727
>>> setp(line)
728728
... long output listing omitted
729729
730-
setp operates on a single instance or a list of instances. If you
731-
are in query mode introspecting the possible values, only the first
732-
instance in the sequence is used. When actually setting values,
733-
all the instances will be set. Eg, suppose you have a list of two
734-
lines, the following will make both lines thicker and red
730+
:func:`setp` operates on a single instance or a list of instances.
731+
If you are in query mode introspecting the possible values, only
732+
the first instance in the sequence is used. When actually setting
733+
values, all the instances will be set. Eg., suppose you have a
734+
list of two lines, the following will make both lines thicker and
735+
red::
735736
736737
>>> x = arange(0,1.0,0.01)
737738
>>> y1 = sin(2*pi*x)
738739
>>> y2 = sin(4*pi*x)
739740
>>> lines = plot(x, y1, x, y2)
740741
>>> setp(lines, linewidth=2, color='r')
741742
742-
setp works with the matlab(TM) style string/value pairs or with
743-
python kwargs. For example, the following are equivalent
743+
:func:`setp` works with the matlab(TM) style string/value pairs or
744+
with python kwargs. For example, the following are equivalent
744745
745746
>>> setp(lines, 'linewidth', 2, 'color', r') # matlab style
746747
>>> setp(lines, linewidth=2, color='r') # python style

0 commit comments

Comments
 (0)