Skip to content

Commit

Permalink
Merge pull request #3585 from matplotlib/v1.4.0-doc
Browse files Browse the repository at this point in the history
merge V1.4.0-doc into v1.4.x
  • Loading branch information
jenshnielsen committed Sep 28, 2014
2 parents 40720ef + 4706ee0 commit 7e6be9d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions doc/_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ <h1>Introduction</h1>
For a sampling, see the <a href="{{ pathto('users/screenshots') }}">screenshots</a>, <a href="{{ pathto('gallery') }}">thumbnail</a> gallery, and
<a href="examples/index.html">examples</a> directory</p>

<p>For simple plotting the <pre>pyplot</pre> interface provides a
<p>For simple plotting the <tt>pyplot</tt> interface provides a
MATLAB-like interface, particularly when combined
with <pre>IPython</pre>. For the power user, you have full control
with <tt>IPython</tt>. For the power user, you have full control
of line styles, font properties, axes properties, etc, via an object
oriented interface or via a set of functions familiar to MATLAB
users.</p>
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/colorbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,12 +1014,12 @@ def make_axes(parents, location=None, orientation=None, fraction=0.15,
Keyword arguments may include the following (with defaults):
location : [`None`|'left'|'right'|'top'|'bottom']
location : [None|'left'|'right'|'top'|'bottom']
The position, relative to **parents**, where the colorbar axes
should be created. If None, the value will either come from the
given ``orientation``, else it will default to 'right'.
orientation : [`None`|'vertical'|'horizontal']
orientation : [None|'vertical'|'horizontal']
The orientation of the colorbar. Typically, this keyword shouldn't
be used, as it can be derived from the ``location`` keyword.
Expand Down
33 changes: 17 additions & 16 deletions lib/matplotlib/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,22 +520,23 @@ class AutoDateFormatter(ticker.Formatter):
>>> formatter = AutoDateFormatter()
>>> formatter.scaled[1/(24.*60.)] = '%M:%S' # only show min and sec
Custom `FunctionFormatter`s can also be used. The following example shows
how to use a custom format function to strip trailing zeros from decimal
seconds and adds the date to the first ticklabel::
>>> def my_format_function(x, pos=None):
... x = matplotlib.dates.num2date(x)
... if pos == 0:
... fmt = '%D %H:%M:%S.%f'
... else:
... fmt = '%H:%M:%S.%f'
... label = x.strftime(fmt)
... label = label.rstrip("0")
... label = label.rstrip(".")
... return label
>>> from matplotlib.ticker import FuncFormatter
>>> formatter.scaled[1/(24.*60.)] = FuncFormatter(my_format_function)
A custom :class:`~matplotlib.ticker.FuncFormatter` can also be used.
The following example shows how to use a custom format function to strip
trailing zeros from decimal seconds and adds the date to the first
ticklabel::
>>> def my_format_function(x, pos=None):
... x = matplotlib.dates.num2date(x)
... if pos == 0:
... fmt = '%D %H:%M:%S.%f'
... else:
... fmt = '%H:%M:%S.%f'
... label = x.strftime(fmt)
... label = label.rstrip("0")
... label = label.rstrip(".")
... return label
>>> from matplotlib.ticker import FuncFormatter
>>> formatter.scaled[1/(24.*60.)] = FuncFormatter(my_format_function)
"""

# This can be improved by providing some user-level direction on
Expand Down

0 comments on commit 7e6be9d

Please sign in to comment.