SourceForge logo
SourceForge logo
Menu

matplotlib-checkins

From: <ef...@us...> - 2010年07月14日 17:37:16
Revision: 8549
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8549&view=rev
Author: efiring
Date: 2010年07月14日 17:37:10 +0000 (2010年7月14日)
Log Message:
-----------
Axes.margin: bugfix--return correct values. Thanks to Georges Schutz.
Modified Paths:
--------------
 branches/v1_0_maint/lib/matplotlib/axes.py
Modified: branches/v1_0_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/axes.py	2010年07月14日 13:51:15 UTC (rev 8548)
+++ branches/v1_0_maint/lib/matplotlib/axes.py	2010年07月14日 17:37:10 UTC (rev 8549)
@@ -1684,7 +1684,7 @@
 
 """
 if not args and not kw:
- return self._ymargin, self._ymargin
+ return self._xmargin, self._ymargin
 
 tight = kw.pop('tight', True)
 mx = kw.pop('x', None)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2010年07月28日 18:48:20
Revision: 8588
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8588&view=rev
Author: mdboom
Date: 2010年07月28日 18:48:14 +0000 (2010年7月28日)
Log Message:
-----------
[3032853] Hist autorange bug using log and histtype
Modified Paths:
--------------
 branches/v1_0_maint/lib/matplotlib/axes.py
Modified: branches/v1_0_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/axes.py	2010年07月28日 18:37:26 UTC (rev 8587)
+++ branches/v1_0_maint/lib/matplotlib/axes.py	2010年07月28日 18:48:14 UTC (rev 8588)
@@ -7699,13 +7699,15 @@
 
 x[0::2], x[1::2] = bins, bins
 
+ minimum = min(bins)
+
 if align == 'left' or align == 'center':
 x -= 0.5*(bins[1]-bins[0])
 elif align == 'right':
 x += 0.5*(bins[1]-bins[0])
 
 if log:
- y[0],y[-1] = 1e-100, 1e-100
+ y[0],y[-1] = minimum, minimum
 if orientation == 'horizontal':
 self.set_xscale('log')
 else: # orientation == 'vertical'
@@ -7716,7 +7718,7 @@
 for m, c in zip(n, color):
 y[1:-1:2], y[2::2] = m, m
 if log:
- y[y<1e-100]=1e-100
+ y[y<minimum]=minimum
 if orientation == 'horizontal':
 x,y = y,x
 
@@ -7729,19 +7731,19 @@
 
 # adopted from adjust_x/ylim part of the bar method
 if orientation == 'horizontal':
- xmin0 = max(_saved_bounds[0]*0.9, 1e-100)
+ xmin0 = max(_saved_bounds[0]*0.9, minimum)
 xmax = self.dataLim.intervalx[1]
 for m in n:
 xmin = np.amin(m[m!=0]) # filter out the 0 height bins
- xmin = max(xmin*0.9, 1e-100)
+ xmin = max(xmin*0.9, minimum)
 xmin = min(xmin0, xmin)
 self.dataLim.intervalx = (xmin, xmax)
 elif orientation == 'vertical':
- ymin0 = max(_saved_bounds[1]*0.9, 1e-100)
+ ymin0 = max(_saved_bounds[1]*0.9, minimum)
 ymax = self.dataLim.intervaly[1]
 for m in n:
 ymin = np.amin(m[m!=0]) # filter out the 0 height bins
- ymin = max(ymin*0.9, 1e-100)
+ ymin = max(ymin*0.9, minimum)
 ymin = min(ymin0, ymin)
 self.dataLim.intervaly = (ymin, ymax)
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <wea...@us...> - 2010年07月29日 21:55:58
Revision: 8595
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8595&view=rev
Author: weathergod
Date: 2010年07月29日 21:55:52 +0000 (2010年7月29日)
Log Message:
-----------
Fix inconsistency with the handling of the 'weights' keyword and input data for hist().
Modified Paths:
--------------
 branches/v1_0_maint/lib/matplotlib/axes.py
Modified: branches/v1_0_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/axes.py	2010年07月29日 16:22:53 UTC (rev 8594)
+++ branches/v1_0_maint/lib/matplotlib/axes.py	2010年07月29日 21:55:52 UTC (rev 8595)
@@ -7551,6 +7551,8 @@
 'hist now uses the rwidth to give relative width '
 'and not absolute width')
 
+ # Massage 'x' for processing.
+ # NOTE: Be sure any changes here is also done below to 'weights'
 if isinstance(x, np.ndarray) or not iterable(x[0]):
 # TODO: support masked arrays;
 x = np.asarray(x)
@@ -7577,8 +7579,9 @@
 if len(color) != nx:
 raise ValueError("color kwarg must have one color per dataset")
 
+ # We need to do to 'weights' what was done to 'x'
 if weights is not None:
- if isinstance(weights, np.ndarray):
+ if isinstance(weights, np.ndarray) or not iterable(weights[0]) :
 w = np.array(weights)
 if w.ndim == 2:
 w = w.T
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2010年09月05日 00:38:51
Revision: 8679
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8679&view=rev
Author: efiring
Date: 2010年09月05日 00:38:45 +0000 (2010年9月05日)
Log Message:
-----------
[3024007] Fix ancient bug in hist inherited from numpy, fixed in numpy 1.5
Modified Paths:
--------------
 branches/v1_0_maint/lib/matplotlib/axes.py
Modified: branches/v1_0_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/axes.py	2010年09月04日 21:23:03 UTC (rev 8678)
+++ branches/v1_0_maint/lib/matplotlib/axes.py	2010年09月05日 00:38:45 UTC (rev 8679)
@@ -7451,6 +7451,12 @@
 pdf, bins, patches = ax.hist(...)
 print np.sum(pdf * np.diff(bins))
 
+ .. Note:: Until numpy release 1.5, the underlying numpy
+ histogram function was incorrect with *normed*=*True*
+ if bin sizes were unequal. MPL inherited that
+ error. It is now corrected within MPL when using
+ earlier numpy versions
+
 *weights*
 An array of weights, of the same shape as *x*. Each value in
 *x* only contributes its associated weight towards the bin
@@ -7632,7 +7638,10 @@
 xmax = max(xmax, xi.max())
 range = (xmin, xmax)
 
- hist_kwargs = dict(range=range, normed=bool(normed))
+ #hist_kwargs = dict(range=range, normed=bool(normed))
+ # We will handle the normed kwarg within mpl until we
+ # get to the point of requiring numpy >= 1.5.
+ hist_kwargs = dict(range=range)
 if np.__version__ < "1.3": # version 1.1 and 1.2
 hist_kwargs['new'] = True
 
@@ -7641,8 +7650,21 @@
 # this will automatically overwrite bins,
 # so that each histogram uses the same bins
 m, bins = np.histogram(x[i], bins, weights=w[i], **hist_kwargs)
+ if normed:
+ db = np.diff(bins)
+ m = (m.astype(float) / db) / m.sum()
 n.append(m)
+ if normed and db.std() > 0.01 * db.mean():
+ warnings.warn("""
+ This release fixes a normalization bug in the NumPy histogram
+ function prior to version 1.5, occuring with non-uniform
+ bin widths. The returned and plotted value is now a density:
+ n / (N * bin width),
+ where n is the bin count and N the total number of points.
+ """)
 
+
+
 if cumulative:
 slc = slice(None)
 if cbook.is_numlike(cumulative) and cumulative < 0:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2010年10月03日 21:04:16
Revision: 8724
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8724&view=rev
Author: efiring
Date: 2010年10月03日 21:04:10 +0000 (2010年10月03日)
Log Message:
-----------
errorbar bugfix: plot everything regardless of the Axes hold state
Modified Paths:
--------------
 branches/v1_0_maint/lib/matplotlib/axes.py
Modified: branches/v1_0_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/axes.py	2010年10月03日 20:45:38 UTC (rev 8723)
+++ branches/v1_0_maint/lib/matplotlib/axes.py	2010年10月03日 21:04:10 UTC (rev 8724)
@@ -5065,7 +5065,7 @@
 type as *xerr* and *yerr*.
 
 All other keyword arguments are passed on to the plot command for the
- markers, For example, this code makes big red squares with
+ markers. For example, this code makes big red squares with
 thick green edges::
 
 x,y,yerr = rand(3,10)
@@ -5099,6 +5099,8 @@
 
 self._process_unit_info(xdata=x, ydata=y, kwargs=kwargs)
 if not self._hold: self.cla()
+ holdstate = self._hold
+ self._hold = True
 
 # make sure all the args are iterable; use lists not arrays to
 # preserve units
@@ -5271,6 +5273,7 @@
 l.set_color(ecolor)
 
 self.autoscale_view()
+ self._hold = holdstate
 return (l0, caplines, barcols)
 
 def boxplot(self, x, notch=0, sym='b+', vert=1, whis=1.5,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2010年10月06日 23:59:21
Revision: 8732
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8732&view=rev
Author: efiring
Date: 2010年10月06日 23:59:15 +0000 (2010年10月06日)
Log Message:
-----------
autoscale_view: respect tight kwarg even if only images are present.
slight modification of patch by Stan West.
Modified Paths:
--------------
 branches/v1_0_maint/lib/matplotlib/axes.py
Modified: branches/v1_0_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/axes.py	2010年10月06日 16:57:16 UTC (rev 8731)
+++ branches/v1_0_maint/lib/matplotlib/axes.py	2010年10月06日 23:59:15 UTC (rev 8732)
@@ -1776,12 +1776,13 @@
 :meth:`matplotlib.axes.Axes.relim`
 prior to calling autoscale_view.
 """
- if tight is not None:
- self._tight = bool(tight)
- # if image data only just use the datalim
- _tight = self._tight or (len(self.images)>0 and
- len(self.lines)==0 and
- len(self.patches)==0)
+ if tight is None:
+ # if image data only just use the datalim
+ _tight = self._tight or (len(self.images)>0 and
+ len(self.lines)==0 and
+ len(self.patches)==0)
+ else:
+ _tight = self._tight = bool(tight)
 
 if scalex and self._autoscaleXon:
 xshared = self._shared_x_axes.get_siblings(self)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2011年01月04日 00:45:31
Revision: 8879
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8879&view=rev
Author: efiring
Date: 2011年01月04日 00:45:25 +0000 (2011年1月04日)
Log Message:
-----------
apply patch by Paul Ivanov to move twinx second axis offset to the RHS
Modified Paths:
--------------
 branches/v1_0_maint/lib/matplotlib/axes.py
Modified: branches/v1_0_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/axes.py	2011年01月03日 21:53:09 UTC (rev 8878)
+++ branches/v1_0_maint/lib/matplotlib/axes.py	2011年01月04日 00:45:25 UTC (rev 8879)
@@ -7378,6 +7378,7 @@
 frameon=False)
 ax2.yaxis.tick_right()
 ax2.yaxis.set_label_position('right')
+ ax2.yaxis.set_offset_position('right')
 self.yaxis.tick_left()
 ax2.xaxis.set_visible(False)
 return ax2
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2011年01月04日 20:24:18
Revision: 8882
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8882&view=rev
Author: efiring
Date: 2011年01月04日 20:24:12 +0000 (2011年1月04日)
Log Message:
-----------
Bugfix: invert_xaxis and invert_yaxis now notify observers. Closes 3123226
Modified Paths:
--------------
 branches/v1_0_maint/lib/matplotlib/axes.py
Modified: branches/v1_0_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/axes.py	2011年01月04日 14:16:36 UTC (rev 8881)
+++ branches/v1_0_maint/lib/matplotlib/axes.py	2011年01月04日 20:24:12 UTC (rev 8882)
@@ -2263,7 +2263,7 @@
 def invert_xaxis(self):
 "Invert the x-axis."
 left, right = self.get_xlim()
- self.viewLim.intervalx = (right, left)
+ self.set_xlim(right, left)
 
 def xaxis_inverted(self):
 'Returns True if the x-axis is inverted.'
@@ -2471,7 +2471,7 @@
 def invert_yaxis(self):
 "Invert the y-axis."
 bottom, top = self.get_ylim()
- self.viewLim.intervaly = (top, bottom)
+ self.set_ylim(top, bottom)
 
 def yaxis_inverted(self):
 'Returns True if the y-axis is inverted.'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /