Skip to content

Commit 59ebe49

Browse files
committed
Merge remote-tracking branch 'origin/v1.4.x'
Conflicts: INSTALL lib/matplotlib/tests/test_coding_standards.py
2 parents 6dfeab5 + 07fbef1 commit 59ebe49

32 files changed

+842
-207
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ matrix:
2323
install:
2424
- pip install -q --use-mirrors nose python-dateutil numpy pep8 pyparsing pillow
2525
- sudo apt-get update && sudo apt-get -qq install inkscape libav-tools
26+
# We use --no-install-recommends to avoid pulling in additional large latex docs that we don't need
27+
- if [[ $BUILD_DOCS == true ]]; then sudo apt-get install -qq --no-install-recommends dvipng texlive-latex-base texlive-latex-extra texlive-fonts-recommended graphviz; fi
2628
- if [[ $BUILD_DOCS == true ]]; then pip install sphinx numpydoc linkchecker; fi
2729
- python setup.py install
2830

INSTALL

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Required Dependencies
193193
using pip, easy_install or installing from source, the installer
194194
will attempt to download and install `pyparsing` from PyPI.
195195

196-
six 1.3 or later
196+
six 1.4 or later
197197
Python 2/3 compatibility library. This is also a dependency of
198198
:term:`dateutil`.
199199

@@ -202,6 +202,11 @@ libpng 1.2 (or later)
202202
<http://www.libpng.org/pub/png/libpng.html>`__). libpng requires
203203
zlib.
204204

205+
`pytz`
206+
Used to manipulate time-zone aware datetimes.
207+
208+
209+
205210
Optional GUI framework
206211
^^^^^^^^^^^^^^^^^^^^^^
207212

@@ -240,19 +245,9 @@ Optional dependencies
240245
If Pillow is installed, matplotlib can read and write a larger
241246
selection of image file formats.
242247

243-
:term:`freetype` 2.4 or later
244-
library for reading true type font files. Matplotlib in known
245-
to work with freetype 2.3, and the required version will be reduced
246-
in 1.4.1. If you need to build from source on a system which only has
247-
freetype 2.3 available, please edit L945 of `setupext.py` to reduce
248-
`min_version` to 2.3.
249-
250-
`pytz`
251-
Required if you want to manipulate datetime objects which are time-zone
252-
aware. An exception will be raised if you try to make time-zone aware
253-
plots with out `pytz` installed. It will become a required dependency
254-
in 1.4.1.
255248

249+
:term:`freetype` 2.3 or later
250+
library for reading true type font files.
256251

257252

258253
Required libraries that ship with matplotlib

doc/_templates/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ <h1>Introduction</h1>
6363
For a sampling, see the <a href="{{ pathto('users/screenshots') }}">screenshots</a>, <a href="{{ pathto('gallery') }}">thumbnail</a> gallery, and
6464
<a href="examples/index.html">examples</a> directory</p>
6565

66-
<p>For simple plotting the <pre>pyplot</pre> interface provides a
66+
<p>For simple plotting the <tt>pyplot</tt> interface provides a
6767
MATLAB-like interface, particularly when combined
68-
with <pre>IPython</pre>. For the power user, you have full control
68+
with <tt>IPython</tt>. For the power user, you have full control
6969
of line styles, font properties, axes properties, etc, via an object
7070
oriented interface or via a set of functions familiar to MATLAB
7171
users.</p>

examples/event_handling/timers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ def update_title(axes):
1414
x = np.linspace(-3, 3)
1515
ax.plot(x, x*x)
1616

17-
# Create a new timer object. Set the interval 500 milliseconds (1000 is default)
18-
# and tell the timer what function should be called.
17+
# Create a new timer object. Set the interval to 100 milliseconds
18+
# (1000 is default) and tell the timer what function should be called.
1919
timer = fig.canvas.new_timer(interval=100)
2020
timer.add_callback(update_title, ax)
2121
timer.start()
2222

23-
#Or could start the timer on first figure draw
23+
# Or could start the timer on first figure draw
2424
#def start_timer(evt):
2525
# timer.start()
2626
# fig.canvas.mpl_disconnect(drawid)

lib/matplotlib/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,11 @@ def matplotlib_fname():
766766
- Lastly, it looks in `$MATPLOTLIBDATA/matplotlibrc` for a
767767
system-defined copy.
768768
"""
769-
fname = os.path.join(os.getcwd(), 'matplotlibrc')
769+
if six.PY2:
770+
cwd = os.getcwdu()
771+
else:
772+
cwd = os.getcwd()
773+
fname = os.path.join(cwd, 'matplotlibrc')
770774
if os.path.exists(fname):
771775
return fname
772776

lib/matplotlib/axes/_axes.py

Lines changed: 48 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,10 @@ def set_title(self, label, fontdict=None, loc="center", **kwargs):
124124
125125
Other parameters
126126
----------------
127-
Other keyword arguments are text properties, see
128-
:class:`~matplotlib.text.Text` for a list of valid text
129-
properties.
127+
kwargs : text properties
128+
Other keyword arguments are text properties, see
129+
:class:`~matplotlib.text.Text` for a list of valid text
130+
properties.
130131
"""
131132
try:
132133
title = {'left': self._left_title,
@@ -2883,7 +2884,7 @@ def xywhere(xs, ys, mask):
28832884

28842885
return errorbar_container # (l0, caplines, barcols)
28852886

2886-
def boxplot(self, x, notch=False, sym='b+', vert=True, whis=1.5,
2887+
def boxplot(self, x, notch=False, sym=None, vert=True, whis=1.5,
28872888
positions=None, widths=None, patch_artist=False,
28882889
bootstrap=None, usermedians=None, conf_intervals=None,
28892890
meanline=False, showmeans=False, showcaps=True,
@@ -2919,11 +2920,13 @@ def boxplot(self, x, notch=False, sym='b+', vert=True, whis=1.5,
29192920
If False, produces a rectangular box plot.
29202921
If True, will produce a notched box plot
29212922
2922-
sym : str, default = 'b+'
2923+
sym : str or None, default = None
29232924
The default symbol for flier points.
29242925
Enter an empty string ('') if you don't want to show fliers.
2926+
If `None`, then the fliers default to 'b+' If you want more
2927+
control use the fliersprop kwarg.
29252928
2926-
vert : bool, default = False
2929+
vert : bool, default = True
29272930
If True (default), makes the boxes vertical.
29282931
If False, makes horizontal boxes.
29292932
@@ -3021,10 +3024,11 @@ def boxplot(self, x, notch=False, sym='b+', vert=True, whis=1.5,
30213024
Returns
30223025
-------
30233026
3024-
A dictionary mapping each component of the boxplot
3025-
to a list of the :class:`matplotlib.lines.Line2D`
3026-
instances created. That dictionary has the following keys
3027-
(assuming vertical boxplots):
3027+
result : dict
3028+
A dictionary mapping each component of the boxplot
3029+
to a list of the :class:`matplotlib.lines.Line2D`
3030+
instances created. That dictionary has the following keys
3031+
(assuming vertical boxplots):
30283032
30293033
- boxes: the main body of the boxplot showing the quartiles
30303034
and the median's confidence intervals if enabled.
@@ -3043,10 +3047,39 @@ def boxplot(self, x, notch=False, sym='b+', vert=True, whis=1.5,
30433047
"""
30443048
bxpstats = cbook.boxplot_stats(x, whis=whis, bootstrap=bootstrap,
30453049
labels=labels)
3050+
# make sure we have a dictionary
30463051
if flierprops is None:
3047-
flierprops = dict(sym=sym)
3048-
else:
3049-
flierprops['sym'] = sym
3052+
flierprops = dict()
3053+
# if non-default sym value, put it into the flier dictionary
3054+
# the logic for providing the default symbol ('b+') now lives
3055+
# in bxp in the initial value of final_flierprops
3056+
# handle all of the `sym` related logic here so we only have to pass
3057+
# on the flierprops dict.
3058+
if sym is not None:
3059+
# no-flier case, which should really be done with
3060+
# 'showfliers=False' but none-the-less deal with it to keep back
3061+
# compatibility
3062+
if sym == '':
3063+
# blow away existing dict and make one for invisible markers
3064+
flierprops = dict(linestyle='none', marker='',
3065+
markeredgecolor='none',
3066+
markerfacecolor='none')
3067+
# now process the symbol string
3068+
else:
3069+
# process the symbol string
3070+
# discarded linestyle
3071+
_, marker, color = _process_plot_format(sym)
3072+
# if we have a marker, use it
3073+
if marker is not None:
3074+
flierprops['marker'] = marker
3075+
# if we have a color, use it
3076+
if color is not None:
3077+
flierprops['color'] = color
3078+
# assume that if color is passed in the user want
3079+
# filled symbol, if the users want more control use
3080+
# flierprops
3081+
flierprops['markeredgecolor'] = color
3082+
flierprops['markerfacecolor'] = color
30503083

30513084
# replace medians if necessary:
30523085
if usermedians is not None:
@@ -3288,24 +3321,9 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
32883321
final_flierprops = dict(linestyle='none', marker='+',
32893322
markeredgecolor='b',
32903323
markerfacecolor='none')
3324+
32913325
# flier (outlier) properties
32923326
if flierprops is not None:
3293-
sym = flierprops.pop('sym', None)
3294-
3295-
# watch inverted logic, checks for non-default
3296-
# value of `sym`
3297-
if not (sym == '' or (sym is None)):
3298-
# process the symbol string
3299-
# discarded linestyle
3300-
_, marker, color = _process_plot_format(sym)
3301-
if marker is not None:
3302-
flierprops['marker'] = marker
3303-
if color is not None:
3304-
flierprops['color'] = color
3305-
# assume that if color is passed in the user want
3306-
# filled symbol
3307-
flierprops['markeredgecolor'] = color
3308-
flierprops['markerfacecolor'] = color
33093327
final_flierprops.update(flierprops)
33103328

33113329
# median line properties
@@ -5032,6 +5050,7 @@ def pcolormesh(self, *args, **kwargs):
50325050
50335051
*edgecolors*: [*None* | ``'None'`` | ``'face'`` | color |
50345052
color sequence]
5053+
50355054
If *None*, the rc setting is used by default.
50365055
50375056
If ``'None'``, edges will not be visible.

0 commit comments

Comments
 (0)