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

Skip to content

Commit fa3f07d

Browse files
committed
getting up to date with master
2 parents c3bfe6c + e7f6874 commit fa3f07d

46 files changed

Lines changed: 59853 additions & 38 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/_static/mpl.css

Lines changed: 92 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
/**
1+
/*
22
* Alternate Sphinx design
33
* Originally created by Armin Ronacher for Werkzeug, adapted by Georg Brandl.
44
*/
55

66
body {
7-
font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif;
7+
font-family: "Raleway", "Helvetica Neue", Helvetica, 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif;
88
font-size: 14px;
99
letter-spacing: -0.01em;
1010
line-height: 150%;
1111
text-align: center;
12-
/*background-color: #AFC1C4; */
1312
background-color: #BFD1D4;
1413
color: black;
1514
padding: 0;
@@ -24,6 +23,10 @@ a {
2423
text-decoration: none;
2524
}
2625

26+
strong {
27+
font-weight: strong;
28+
}
29+
2730
a:hover {
2831
color: #2491CF;
2932
}
@@ -103,7 +106,7 @@ dl {
103106
}
104107

105108
dd p {
106-
margin-top: 0px;
109+
margin-top: 1px;
107110
}
108111

109112
dd ul, dd table {
@@ -251,7 +254,7 @@ div.sphinxsidebar ul ul {
251254
}
252255

253256
p {
254-
margin: 0.8em 0 0.5em 0;
257+
margin: 0.8em 0 0.8em 0;
255258
}
256259

257260
p.rubric {
@@ -518,24 +521,104 @@ table.docutils {
518521
table.docutils tr:nth-child(even) {
519522
background-color: #F3F3FF;
520523
}
524+
521525
table.docutils tr:nth-child(odd) {
522526
background-color: #FFFFEE;
523527
}
524528

525-
table.docutils tr {
526-
border-style: solid none solid none;
527-
border-width: 1px 0 1px 0;
528-
border-color: #AAAAAA;
529+
/* module summary table */
530+
.longtable.docutils {
531+
font-size: 12px;
532+
margin-bottom: 30px;
533+
background-color: #ccc;
534+
}
535+
.longtable.docutils, .longtable.docutils td {
536+
border-color: #ccc;
537+
}
538+
539+
/* function and class description */
540+
dl.class, dl.function, dl.method, dl.attribute {
541+
border-top: 1px solid #ccc;
542+
padding-top: 10px;
543+
}
544+
.descclassname {
545+
color: #aaa;
546+
font-weight: normal;
547+
font-family: monospace;
529548
}
549+
.descname {
550+
font-family: monospace;
551+
}
552+
553+
/* module summary table */
554+
.longtable.docutils {
555+
font-size: 12px;
556+
margin-bottom: 30px;
557+
}
558+
.longtable.docutils, .longtable.docutils td {
559+
border-color: #ccc;
560+
}
561+
562+
/* function and class description */
563+
dl.class, dl.function, dl.method, dl.attribute {
564+
border-top: 1px solid #ccc;
565+
padding-top: 10px;
566+
}
567+
.descclassname {
568+
color: #aaa;
569+
font-weight: normal;
570+
font-family: monospace;
571+
}
572+
.descname {
573+
font-family: monospace;
574+
}
575+
530576

531577
table.docutils th {
532578
padding: 1px 8px 1px 5px;
579+
background-color: #eee;
580+
width: 100px;
533581
}
534582

535583
table.docutils td {
536584
border-width: 1px 0 1px 0;
537585
}
538586

587+
588+
dl.class em, dl.function em, dl.class big, dl.function big {
589+
font-weight: normal;
590+
font-family: monospace;
591+
}
592+
dl.class dd, dl.function dd {
593+
padding: 10px;
594+
}
595+
.docutils.field-list th {
596+
background-color: #eee;
597+
padding: 10px;
598+
text-align: left;
599+
vertical-align: top;
600+
width: 120px;
601+
}
602+
.docutils.field-list td {
603+
padding: 10px 10px 10px 20px;
604+
text-align: left;
605+
vertical-align: top;
606+
}
607+
.docutils.field-list td blockquote p {
608+
font-size: 13px;
609+
line-height: 18px;
610+
}
611+
p.rubric {
612+
font-weight: bold;
613+
font-size: 19px;
614+
margin: 15px 0 10px 0;
615+
}
616+
p.admonition-title {
617+
font-weight: bold;
618+
text-decoration: underline;
619+
}
620+
621+
539622
#matplotlib-examples ul li{
540623
font-size: large;
541624
}

doc/_templates/layout.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{% extends "!layout.html" %}
22

3+
<link href="http://fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css">
4+
35
{% block rootrellink %}
46
<li><a href="{{ pathto('index') }}">home</a>|&nbsp;</li>
57
<li><a href="{{ pathto('examples/index') }}">examples</a>|&nbsp;</li>

lib/matplotlib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,7 @@ def tk_window_focus():
12301230
'matplotlib.tests.test_spines',
12311231
'matplotlib.tests.test_streamplot',
12321232
'matplotlib.tests.test_subplots',
1233+
'matplotlib.tests.test_table',
12331234
'matplotlib.tests.test_text',
12341235
'matplotlib.tests.test_ticker',
12351236
'matplotlib.tests.test_tightlayout',

lib/matplotlib/axes/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
from matplotlib.axes._subplots import *
22
from matplotlib.axes._axes import *
3-
from matplotlib.axes._base import _string_to_bool

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
rcParams = matplotlib.rcParams
1111

1212
import matplotlib.cbook as cbook
13+
from matplotlib.cbook import _string_to_bool
1314
import matplotlib.collections as mcoll
1415
import matplotlib.colors as mcolors
1516
import matplotlib.contour as mcontour

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
rcParams = matplotlib.rcParams
1111

1212
from matplotlib import cbook
13+
from matplotlib.cbook import _string_to_bool
1314
from matplotlib import docstring
1415
import matplotlib.colors as mcolors
1516
import matplotlib.lines as mlines
@@ -33,16 +34,6 @@
3334
is_sequence_of_strings = cbook.is_sequence_of_strings
3435

3536

36-
def _string_to_bool(s):
37-
if not is_string_like(s):
38-
return s
39-
if s == 'on':
40-
return True
41-
if s == 'off':
42-
return False
43-
raise ValueError("string argument must be either 'on' or 'off'")
44-
45-
4637
def _process_plot_format(fmt):
4738
"""
4839
Process a MATLAB style color/line style format string. Return a

lib/matplotlib/cbook.py

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ class MatplotlibDeprecationWarning(UserWarning):
4545
mplDeprecation = MatplotlibDeprecationWarning
4646

4747

48-
def _generate_deprecation_message(
49-
since, message='', name='', alternative='', pending=False,
50-
obj_type='attribute'):
48+
def _generate_deprecation_message(since, message='', name='',
49+
alternative='', pending=False,
50+
obj_type='attribute'):
5151

5252
if not message:
5353
altmessage = ''
@@ -464,9 +464,11 @@ class CallbackRegistry:
464464
"""
465465
def __init__(self, *args):
466466
if len(args):
467-
warn_deprecated('1.3', message=
468-
"CallbackRegistry no longer requires a list of callback "
469-
"types. Ignoring arguments. *args will be removed in 1.5")
467+
warn_deprecated(
468+
'1.3',
469+
message="CallbackRegistry no longer requires a list of "
470+
"callback types. Ignoring arguments. *args will "
471+
"be removed in 1.5")
470472
self.callbacks = dict()
471473
self._cid = 0
472474
self._func_cid_map = {}
@@ -750,6 +752,16 @@ def is_scalar_or_string(val):
750752
return is_string_like(val) or not iterable(val)
751753

752754

755+
def _string_to_bool(s):
756+
if not is_string_like(s):
757+
return s
758+
if s == 'on':
759+
return True
760+
if s == 'off':
761+
return False
762+
raise ValueError("string argument must be either 'on' or 'off'")
763+
764+
753765
def get_sample_data(fname, asfileobj=True):
754766
"""
755767
Return a sample data file. *fname* is a path relative to the
@@ -1724,8 +1736,8 @@ def simple_linear_interpolation(a, steps):
17241736

17251737
def recursive_remove(path):
17261738
if os.path.isdir(path):
1727-
for fname in glob.glob(os.path.join(path, '*')) + \
1728-
glob.glob(os.path.join(path, '.*')):
1739+
for fname in (glob.glob(os.path.join(path, '*')) +
1740+
glob.glob(os.path.join(path, '.*'))):
17291741
if os.path.isdir(fname):
17301742
recursive_remove(fname)
17311743
os.removedirs(fname)

lib/matplotlib/font_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def get_fontconfig_fonts(fontext='ttf'):
273273
try:
274274
pipe = subprocess.Popen(['fc-list', '', 'file'], stdout=subprocess.PIPE)
275275
output = pipe.communicate()[0]
276-
except OSError:
276+
except OSError, IOError:
277277
# Calling fc-list did not work, so we'll just return nothing
278278
return fontfiles
279279

@@ -1296,7 +1296,7 @@ def fc_match(pattern, fontext):
12961296
try:
12971297
pipe = subprocess.Popen(['fc-match', '-sv', pattern], stdout=subprocess.PIPE)
12981298
output = pipe.communicate()[0]
1299-
except OSError:
1299+
except OSError, IOError:
13001300
return None
13011301
if pipe.returncode == 0:
13021302
for match in _fc_match_regex.finditer(output):

lib/matplotlib/pyplot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import matplotlib.colorbar
2525
from matplotlib import _pylab_helpers, interactive
2626
from matplotlib.cbook import dedent, silent_list, is_string_like, is_numlike
27+
from matplotlib.cbook import _string_to_bool
2728
from matplotlib import docstring
2829
from matplotlib.backend_bases import FigureCanvasBase
2930
from matplotlib.figure import Figure, figaspect
@@ -35,7 +36,7 @@
3536
from matplotlib.rcsetup import interactive_bk as _interactive_bk
3637
from matplotlib.artist import getp, get, Artist
3738
from matplotlib.artist import setp as _setp
38-
from matplotlib.axes import Axes, Subplot, _string_to_bool
39+
from matplotlib.axes import Axes, Subplot
3940
from matplotlib.projections import PolarAxes
4041
from matplotlib import mlab # for csv2rec, detrend_none, window_hanning
4142
from matplotlib.scale import get_scale_docs, get_scale_names

lib/matplotlib/table.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class Table(Artist):
177177
FONTSIZE = 10
178178
AXESPAD = 0.02 # the border between the axes and table edge
179179

180-
def __init__(self, ax, loc=None, bbox=None):
180+
def __init__(self, ax, loc=None, bbox=None, **kwargs):
181181

182182
Artist.__init__(self)
183183

@@ -201,6 +201,7 @@ def __init__(self, ax, loc=None, bbox=None):
201201
self._autoRows = []
202202
self._autoColumns = []
203203
self._autoFontsize = True
204+
self.update(kwargs)
204205

205206
self.set_clip_on(False)
206207

@@ -453,7 +454,8 @@ def table(ax,
453454
cellLoc='right', colWidths=None,
454455
rowLabels=None, rowColours=None, rowLoc='left',
455456
colLabels=None, colColours=None, colLoc='center',
456-
loc='bottom', bbox=None):
457+
loc='bottom', bbox=None,
458+
**kwargs):
457459
"""
458460
TABLE(cellText=None, cellColours=None,
459461
cellLoc='right', colWidths=None,
@@ -517,7 +519,7 @@ def table(ax,
517519
cellColours = ['w' * cols] * rows
518520

519521
# Now create the table
520-
table = Table(ax, loc, bbox)
522+
table = Table(ax, loc, bbox, **kwargs)
521523
height = table._approx_text_height()
522524

523525
# Add the cells

0 commit comments

Comments
 (0)