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

Skip to content

Commit 214a9ea

Browse files
committed
fixed a date_support bug
svn path=/trunk/matplotlib/; revision=3129
1 parent d6ba29f commit 214a9ea

3 files changed

Lines changed: 16 additions & 17 deletions

File tree

examples/units/date_support.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def axisinfo(unit):
2323

2424
def convert(value, unit):
2525
if units.ConversionInterface.is_numlike(value): return value
26-
if not DateConverter.is_date(value): return value
2726
return dates.date2num(value)
2827
convert = staticmethod(convert)
2928

lib/matplotlib/mpl-data/matplotlibrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#### CONFIGURATION BEGINS HERE
2727
# the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg
2828
# Agg Cairo GD GDK Paint PS PDF SVG Template
29-
backend : TkAgg
29+
backend : WXAgg
3030
numerix : numpy # numpy, Numeric or numarray
3131
units : True
3232
#interactive : False # see http://matplotlib.sourceforge.net/interactive.html

lib/matplotlib/quiver.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'''
1+
"""
22
Support for plotting fields of arrows.
33
44
Presently this contains a single class, Quiver, but it
@@ -7,10 +7,10 @@
77
This will also become a home for things such as standard
88
deviation ellipses, which can and will be derived very easily from
99
the Quiver code.
10-
'''
10+
"""
1111

1212

13-
_quiver_doc = '''
13+
_quiver_doc = """
1414
Plot a 2-D field of arrows.
1515
1616
Function signatures:
@@ -97,9 +97,9 @@
9797
linewidths = (1,), edgecolors = ('g',)
9898
to make the arrows have green outlines of unit width.
9999
100-
'''
100+
"""
101101

102-
_quiverkey_doc = '''
102+
_quiverkey_doc = """
103103
Add a key to a quiver plot.
104104
105105
Function signature:
@@ -138,7 +138,7 @@
138138
positions the head, and if labelpos is 'W', X,Y positions the
139139
tail; in either of these two cases, X,Y is somewhere in the middle
140140
of the arrow+label key object.
141-
'''
141+
"""
142142

143143
from matplotlib.collections import PolyCollection
144144
from matplotlib.mlab import meshgrid
@@ -151,8 +151,8 @@
151151

152152

153153
class QuiverKey(Artist):
154-
''' Labelled arrow for use as a quiver plot scale key.
155-
'''
154+
""" Labelled arrow for use as a quiver plot scale key.
155+
"""
156156
halign = {'N': 'center', 'S': 'center', 'E': 'left', 'W': 'right'}
157157
valign = {'N': 'bottom', 'S': 'top', 'E': 'center', 'W': 'center'}
158158
pivot = {'N': 'mid', 'S': 'mid', 'E': 'tip', 'W': 'tail'}
@@ -242,7 +242,7 @@ def _set_transform(self):
242242
quiverkey_doc = _quiverkey_doc
243243

244244
class Quiver(PolyCollection):
245-
'''
245+
"""
246246
Specialized PolyCollection for arrows.
247247
248248
The only API method is set_UVC(), which can be used
@@ -257,7 +257,7 @@ class Quiver(PolyCollection):
257257
is limited to things that might have changed, so there
258258
should be no performance penalty from putting the calculations
259259
in the draw() method.
260-
'''
260+
"""
261261
def __init__(self, ax, *args, **kw):
262262
self.ax = ax
263263
X, Y, U, V, C = self._parse_args(*args)
@@ -285,11 +285,11 @@ def __init__(self, ax, *args, **kw):
285285
self.keyvec = None
286286
self.keytext = None
287287

288-
__init__.__doc__ = '''
288+
__init__.__doc__ = """
289289
The constructor takes one required argument, an Axes
290290
instance, followed by the args and kwargs described
291291
by the following pylab interface documentation:
292-
%s''' % _quiver_doc
292+
%s""" % _quiver_doc
293293

294294
def _parse_args(self, *args):
295295
X, Y, U, V, C = [None]*5
@@ -313,9 +313,9 @@ def _parse_args(self, *args):
313313
return X, Y, U, V, C
314314

315315
def _init(self):
316-
'''initialization delayed until first draw;
316+
"""initialization delayed until first draw;
317317
allow time for axes setup.
318-
'''
318+
"""
319319
if not self._initialized:
320320
trans = self._set_transform()
321321
ax = self.ax
@@ -394,7 +394,7 @@ def _make_verts(self, U, V):
394394

395395

396396
def _h_arrows(self, length):
397-
''' length is in arrow width units '''
397+
""" length is in arrow width units """
398398
minsh = self.minshaft * self.headlength
399399
N = len(length)
400400
length = nx.reshape(length, (N,1))

0 commit comments

Comments
 (0)