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

Skip to content

Commit 61e460f

Browse files
committed
fixed hatchh patch bug
svn path=/trunk/matplotlib/; revision=1936
1 parent 8c2bfae commit 61e460f

4 files changed

Lines changed: 13 additions & 15 deletions

File tree

lib/matplotlib/axes.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,7 @@ def cohere(self, x, y, NFFT=256, Fs=2, detrend=detrend_none,
12791279
window=window_hanning, noverlap=0, **kwargs):
12801280
"""
12811281
COHERE(x, y, NFFT=256, Fs=2, detrend=detrend_none,
1282-
window=window_hanning, noverlap=0)
1282+
window=window_hanning, noverlap=0, **kwargs)
12831283
12841284
cohere the coherence between x and y. Coherence is the normalized
12851285
cross spectral density
@@ -1310,10 +1310,10 @@ def cohere(self, x, y, NFFT=256, Fs=2, detrend=detrend_none,
13101310

13111311

13121312
def csd(self, x, y, NFFT=256, Fs=2, detrend=detrend_none,
1313-
window=window_hanning, noverlap=0):
1313+
window=window_hanning, noverlap=0, **kwargs):
13141314
"""
13151315
CSD(x, y, NFFT=256, Fs=2, detrend=detrend_none,
1316-
window=window_hanning, noverlap=0)
1316+
window=window_hanning, noverlap=0, **kwargs)
13171317
13181318
The cross spectral density Pxy by Welches average periodogram method.
13191319
The vectors x and y are divided into NFFT length segments. Each
@@ -1337,7 +1337,7 @@ def csd(self, x, y, NFFT=256, Fs=2, detrend=detrend_none,
13371337
pxy.shape = len(freqs),
13381338
# pxy is complex
13391339

1340-
self.plot(freqs, 10*log10(absolute(pxy)))
1340+
self.plot(freqs, 10*log10(absolute(pxy)), **kwargs)
13411341
self.set_xlabel('Frequency')
13421342
self.set_ylabel('Cross Spectrum Magnitude (dB)')
13431343
self.grid(True)
@@ -2683,10 +2683,10 @@ def plot_date(self, x, y, fmt='bo', tz=None, xdate=True, ydate=False,
26832683
return ret
26842684

26852685
def psd(self, x, NFFT=256, Fs=2, detrend=detrend_none,
2686-
window=window_hanning, noverlap=0):
2686+
window=window_hanning, noverlap=0, **kwargs):
26872687
"""
26882688
PSD(x, NFFT=256, Fs=2, detrend=detrend_none,
2689-
window=window_hanning, noverlap=0)
2689+
window=window_hanning, noverlap=0, **kwargs)
26902690
26912691
The power spectral density by Welches average periodogram method. The
26922692
vector x is divided into NFFT length segments. Each segment is
@@ -2713,6 +2713,7 @@ def psd(self, x, NFFT=256, Fs=2, detrend=detrend_none,
27132713
27142714
noverlap gives the length of the overlap between segments.
27152715
2716+
kwargs are passed to plot to control line props
27162717
Returns the tuple Pxx, freqs
27172718
27182719
For plotting, the power is plotted as 10*log10(pxx)) for decibels,
@@ -2728,7 +2729,7 @@ def psd(self, x, NFFT=256, Fs=2, detrend=detrend_none,
27282729
pxx, freqs = matplotlib.mlab.psd(x, NFFT, Fs, detrend, window, noverlap)
27292730
pxx.shape = len(freqs),
27302731

2731-
self.plot(freqs, 10*log10(pxx))
2732+
self.plot(freqs, 10*log10(pxx), **kwargs)
27322733
self.set_xlabel('Frequency')
27332734
self.set_ylabel('Power Spectrum (dB)')
27342735
self.grid(True)
@@ -3011,7 +3012,6 @@ def semilogx(self, *args, **kwargs):
30113012
which depend on the number of decades in the plot
30123013
30133014
"""
3014-
# hi fernando
30153015
if not self._hold: self.cla()
30163016
d = {'basex': kwargs.get('basex', 10),
30173017
'subsx': kwargs.get('subsx', None),
@@ -3043,7 +3043,6 @@ def semilogy(self, *args, **kwargs):
30433043
which depend on the number of decades in the plot
30443044
30453045
"""
3046-
# hi fernando
30473046
if not self._hold: self.cla()
30483047

30493048
d = {'basey': kwargs.get('basey', 10),
@@ -3587,7 +3586,9 @@ def text(self, x, y, s, fontdict=None,
35873586
t.update(kwargs)
35883587
self.texts.append(t)
35893588

3590-
if t.get_clip_on(): t.set_clip_box(self.bbox)
3589+
3590+
#if t.get_clip_on(): t.set_clip_box(self.bbox)
3591+
if kwargs.has_key('clip_on'): t.set_clip_box(self.bbox)
35913592
return t
35923593

35933594

lib/matplotlib/patches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def draw(self, renderer):
159159
else: rgbFace = colorConverter.to_rgb(self._facecolor)
160160

161161
if self._hatch:
162-
gc.set_hatch(self._hatchh )
162+
gc.set_hatch(self._hatch )
163163

164164
verts = self.get_verts()
165165
tverts = self._transform.seq_xy_tups(verts)

matplotlibrc.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg
2828
# Agg Cairo GD GDK Paint PS SVG Template
2929
backend : %(backend)s
30-
numerix : %(numerix)s # Numeric or numarray
30+
numerix : %(numerix)s # numpy, Numeric or numarray
3131
interactive : False # see http://matplotlib.sourceforge.net/interactive.html
3232
toolbar : toolbar2 # None | classic | toolbar2
3333
timezone : UTC # a pytz timezone string, eg US/Central or Europe/Paris

setup.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@
148148

149149
rc['numerix'] = NUMERIX[-1]
150150

151-
# This print interers with --version, which license depends on
152-
#print "Compiling matplotlib for:", NUMERIX
153-
154151
ext_modules = []
155152

156153
# these are not optional

0 commit comments

Comments
 (0)