From: <jd...@us...> - 2008-07-17 20:51:40
|
Revision: 5784 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5784&view=rev Author: jdh2358 Date: 2008-07-17 20:51:38 +0000 (Thu, 17 Jul 2008) Log Message: ----------- committed vineet's autodateformatter tz patch Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-07-17 19:38:32 UTC (rev 5783) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-07-17 20:51:38 UTC (rev 5784) @@ -2095,7 +2095,7 @@ formatter = self.xaxis.get_major_formatter() if not isinstance(formatter, mdates.DateFormatter): - formatter = mdates.AutoDateFormatter(locator) + formatter = mdates.AutoDateFormatter(locator, tz) self.xaxis.set_major_formatter(formatter) def yaxis_date(self, tz=None): @@ -2132,7 +2132,7 @@ formatter = self.xaxis.get_major_formatter() if not isinstance(formatter, mdates.DateFormatter): - formatter = mdates.AutoDateFormatter(locator) + formatter = mdates.AutoDateFormatter(locator, tz) self.yaxis.set_major_formatter(formatter) def format_xdata(self, x): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2008-07-22 19:47:09
|
Revision: 5813 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5813&view=rev Author: astraw Date: 2008-07-22 19:47:04 +0000 (Tue, 22 Jul 2008) Log Message: ----------- minor docstring fix Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-07-22 18:43:38 UTC (rev 5812) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-07-22 19:47:04 UTC (rev 5813) @@ -4724,7 +4724,7 @@ arguments will be used only if *c* is an array of floats. *cmap*: [ None | Colormap ] - A :class:`matplotlib.cm.Colormap` instance. If *None*, + A :class:`matplotlib.colors.Colormap` instance. If *None*, defaults to rc ``image.cmap``. *cmap* is only used if *c* is an array of floats. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dmk...@us...> - 2008-07-25 10:22:33
|
Revision: 5868 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5868&view=rev Author: dmkaplan Date: 2008-07-25 10:22:29 +0000 (Fri, 25 Jul 2008) Log Message: ----------- Committing a small change to make twinx share axes like twiny. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-07-25 06:30:52 UTC (rev 5867) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-07-25 10:22:29 UTC (rev 5868) @@ -6006,7 +6006,7 @@ right """ - ax2 = self.figure.add_axes(self.get_position(True), # sharex=self, + ax2 = self.figure.add_axes(self.get_position(True), sharex=self, frameon=False) ax2.yaxis.tick_right() ax2.yaxis.set_label_position('right') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2008-07-27 01:17:57
|
Revision: 5898 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5898&view=rev Author: astraw Date: 2008-07-27 01:17:54 +0000 (Sun, 27 Jul 2008) Log Message: ----------- fix bug where reduce_C_function was being misapplied in hexbin() Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-07-27 00:58:51 UTC (rev 5897) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-07-27 01:17:54 UTC (rev 5898) @@ -5137,14 +5137,14 @@ for j in range(ny1): vals = lattice1[i,j] if len(vals): - lattice1[i,j] = reduce( reduce_C_function, vals ) + lattice1[i,j] = reduce_C_function( vals ) else: lattice1[i,j] = np.nan for i in range(nx2): for j in range(ny2): vals = lattice2[i,j] if len(vals): - lattice2[i,j] = reduce( reduce_C_function, vals ) + lattice2[i,j] = reduce_C_function( vals ) else: lattice2[i,j] = np.nan This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2008-07-28 16:42:12
|
Revision: 5912 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5912&view=rev Author: jdh2358 Date: 2008-07-28 16:42:10 +0000 (Mon, 28 Jul 2008) Log Message: ----------- added some additional comments to axes to clarify the patch/frame relationship Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-07-28 16:37:00 UTC (rev 5911) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-07-28 16:42:10 UTC (rev 5912) @@ -1451,6 +1451,8 @@ self.apply_aspect(self.get_position(True)) + # the patch draws the background rectangle -- the frame below + # will draw the edges if self.axison and self._frameon: self.patch.draw(renderer) @@ -1506,6 +1508,9 @@ if self.legend_ is not None: artists.append(self.legend_) + # the frame draws the edges around the axes patch -- we + # decouple these so the patch can be in the background and the + # frame in the foreground. if self.axison and self._frameon: artists.append(self.frame) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mme...@us...> - 2008-07-29 10:53:48
|
Revision: 5916 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5916&view=rev Author: mmetz_bn Date: 2008-07-29 10:53:45 +0000 (Tue, 29 Jul 2008) Log Message: ----------- Minor hist-doc updates Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-07-28 19:59:19 UTC (rev 5915) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-07-29 10:53:45 UTC (rev 5916) @@ -6127,10 +6127,12 @@ is an integer input argument=numbins, *bins* + 1 bin edges will be returned, compatible with the semantics of :func:`numpy.histogram` with the *new* = True argument. + Unequally spaced bins are supported if *bins* is a sequence. *range*: The lower and upper range of the bins. Lower and upper outliers are ignored. If not provided, *range* is (x.min(), x.max()). + Range has no effect if *bins* is a sequence. *normed*: If *True*, the first element of the return tuple will @@ -6147,7 +6149,7 @@ gives the counts in that bin plus all bins for smaller values. The last bin gives the total number of datapoints. If *normed* is also *True* then the histogram is normalized such that the - last bin equals one. If *cumulative* evaluates to less that 1 + last bin equals one. If *cumulative* evaluates to less than 0 (e.g. -1), the direction of accumulation is reversed. In this case, if *normed* is also *True*, then the histogram is normalized such that the first bin equals 1. @@ -6167,8 +6169,7 @@ filled. *align*: ['left' | 'mid' | 'right' ] - Controls how the histogram is - plotted. + Controls how the histogram is plotted. - 'left': bars are centered on the left bin edges @@ -6178,7 +6179,8 @@ *orientation*: [ 'horizontal' | 'vertical' ] If 'horizontal', :func:`~matplotlib.pyplot.barh` will be - used and the *bottom* kwarg will be the left edges. + used for bar-type histograms and the *bottom* kwarg will be + the left edges. *rwidth*: the relative width of the bars as a fraction of the bin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mme...@us...> - 2008-07-30 12:41:07
|
Revision: 5927 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5927&view=rev Author: mmetz_bn Date: 2008-07-30 12:41:04 +0000 (Wed, 30 Jul 2008) Log Message: ----------- use xrange instead of range in hexbin Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-07-29 21:42:37 UTC (rev 5926) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-07-30 12:41:04 UTC (rev 5927) @@ -5120,7 +5120,7 @@ lattice1.shape = (nx1,ny1) lattice2.shape = (nx2,ny2) - for i in range(len(x)): + for i in xrange(len(x)): if bdist[i]: lattice1[ix1[i], iy1[i]]+=1 else: @@ -5128,29 +5128,29 @@ else: # create accumulation arrays lattice1 = np.empty((nx1,ny1),dtype=object) - for i in range(nx1): - for j in range(ny1): + for i in xrange(nx1): + for j in xrange(ny1): lattice1[i,j] = [] lattice2 = np.empty((nx2,ny2),dtype=object) - for i in range(nx2): - for j in range(ny2): + for i in xrange(nx2): + for j in xrange(ny2): lattice2[i,j] = [] - for i in range(len(x)): + for i in xrange(len(x)): if bdist[i]: lattice1[ix1[i], iy1[i]].append( C[i] ) else: lattice2[ix2[i], iy2[i]].append( C[i] ) - for i in range(nx1): - for j in range(ny1): + for i in xrange(nx1): + for j in xrange(ny1): vals = lattice1[i,j] if len(vals): lattice1[i,j] = reduce_C_function( vals ) else: lattice1[i,j] = np.nan - for i in range(nx2): - for j in range(ny2): + for i in xrange(nx2): + for j in xrange(ny2): vals = lattice2[i,j] if len(vals): lattice2[i,j] = reduce_C_function( vals ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ry...@us...> - 2008-09-04 18:29:30
|
Revision: 6063 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6063&view=rev Author: ryanmay Date: 2008-09-04 18:29:28 +0000 (Thu, 04 Sep 2008) Log Message: ----------- Correct return in docstring for boxplot. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-09-03 19:58:01 UTC (rev 6062) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-09-04 18:29:28 UTC (rev 6063) @@ -4504,8 +4504,9 @@ *x* is an array or a sequence of vectors. - Returns a list of the :class:`matplotlib.lines.Line2D` - instances added. + Returns a dictionary mapping each component of the boxplot + to a list of the :class:`matplotlib.lines.Line2D` + instances created. **Example:** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jr...@us...> - 2008-09-15 12:58:33
|
Revision: 6095 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6095&view=rev Author: jrevans Date: 2008-09-15 19:58:25 +0000 (Mon, 15 Sep 2008) Log Message: ----------- Fixed bug #1889750. Now an axes will not attempt to determine the default units to use if units have already been determined for a particular Axis. Previously, by doing this it would override any axis labels set whenever any unit determination calls were made. This can still happen, but now some of the unneccessary unit determination calls are no longer being made. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-09-14 19:18:54 UTC (rev 6094) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-09-15 19:58:25 UTC (rev 6095) @@ -1374,11 +1374,15 @@ #print 'processing', self.get_geometry() if xdata is not None: - self.xaxis.update_units(xdata) + # we only need to update if there is nothing set yet. + if not self.xaxis.have_units(): + self.xaxis.update_units(xdata) #print '\tset from xdata', self.xaxis.units if ydata is not None: - self.yaxis.update_units(ydata) + # we only need to update if there is nothing set yet. + if not self.yaxis.have_units(): + self.yaxis.update_units(ydata) #print '\tset from ydata', self.yaxis.units # process kwargs 2nd since these will override default units This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jr...@us...> - 2008-09-17 08:47:07
|
Revision: 6100 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6100&view=rev Author: jrevans Date: 2008-09-17 15:47:02 +0000 (Wed, 17 Sep 2008) Log Message: ----------- The previous fix broke the current behaviour of being able to explicitly set a new unit type for a specific axis after it was already set. This fixes that. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-09-17 02:10:58 UTC (rev 6099) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-09-17 15:47:02 UTC (rev 6100) @@ -1391,11 +1391,17 @@ if xunits!=self.xaxis.units: #print '\tkw setting xunits', xunits self.xaxis.set_units(xunits) + # If the units being set imply a different converter, we need to update. + if xdata is not None: + self.xaxis.update_units(xdata) yunits = kwargs.pop('yunits', self.yaxis.units) if yunits!=self.yaxis.units: #print '\tkw setting yunits', yunits self.yaxis.set_units(yunits) + # If the units being set imply a different converter, we need to update. + if ydata is not None: + self.yaxis.update_units(ydata) def in_axes(self, mouseevent): ''' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2008-10-01 08:04:19
|
Revision: 6140 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6140&view=rev Author: efiring Date: 2008-10-01 08:04:02 +0000 (Wed, 01 Oct 2008) Log Message: ----------- Fix bug in color handling by bar, found by Thomas Guettler Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-01 02:24:15 UTC (rev 6139) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-01 08:04:02 UTC (rev 6140) @@ -3822,25 +3822,22 @@ #width = np.asarray(width) #bottom = np.asarray(bottom) - if len(linewidth) == 1: linewidth = linewidth * nbars + if len(linewidth) < nbars: + linewidth *= nbars - # if color looks like a color string, an RGB tuple or a - # scalar, then repeat it by nbars - if (is_string_like(color) or - (iterable(color) and - len(color) in (3, 4) and - nbars != len(color)) or - not iterable(color)): - color = [color]*nbars + if color is None: + color = [None] * nbars + else: + color = list(mcolors.colorConverter.to_rgba_array(color)) + if len(color) < nbars: + color *= nbars - # if edgecolor looks like a color string, an RGB tuple or a - # scalar, then repeat it by nbars - if (is_string_like(edgecolor) or - (iterable(edgecolor) and - len(edgecolor) in (3, 4) and - nbars != len(edgecolor)) or - not iterable(edgecolor)): - edgecolor = [edgecolor]*nbars + if edgecolor is None: + edgecolor = [None] * nbars + else: + edgecolor = list(mcolors.colorConverter.to_rgba_array(edgecolor)) + if len(edgecolor) < nbars: + edgecolor *= nbars if yerr is not None: if not iterable(yerr): @@ -3850,13 +3847,12 @@ if not iterable(xerr): xerr = [xerr]*nbars + # FIXME: convert the following to proper input validation + # raising ValueError; don't use assert for this. assert len(left)==nbars, "argument 'left' must be %d or scalar" % nbars assert len(height)==nbars, "argument 'height' must be %d or scalar" % nbars assert len(width)==nbars, "argument 'width' must be %d or scalar" % nbars assert len(bottom)==nbars, "argument 'bottom' must be %d or scalar" % nbars - assert len(color)==nbars, "argument 'color' must be %d or scalar" % nbars - assert len(edgecolor)==nbars, "argument 'edgecolor' must be %d or scalar" % nbars - assert len(linewidth)==nbars, "argument 'linewidth' must be %d or scalar" % nbars if yerr is not None and len(yerr)!=nbars: raise ValueError("bar() argument 'yerr' must be len(%s) or scalar" % nbars) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mme...@us...> - 2008-10-16 11:15:31
|
Revision: 6217 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6217&view=rev Author: mmetz_bn Date: 2008-10-16 11:15:25 +0000 (Thu, 16 Oct 2008) Log Message: ----------- minor optimizations: replacing range by xrange in for loops Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-15 20:53:09 UTC (rev 6216) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-16 11:15:25 UTC (rev 6217) @@ -243,7 +243,7 @@ x, y, multicol = self._xy_from_y(y) if multicol: - for j in range(y.shape[1]): + for j in xrange(y.shape[1]): color = self._get_next_cycle_color() seg = mlines.Line2D(x, y[:,j], color = color, @@ -285,7 +285,7 @@ ret.append(seg) if multicol: - for j in range(y.shape[1]): + for j in xrange(y.shape[1]): makeline(x[:,j], y[:,j]) else: makeline(x, y) @@ -324,7 +324,7 @@ closed = kwargs.get('closed', True) func = makefill if multicol: - for j in range(y.shape[1]): + for j in xrange(y.shape[1]): func(x[:,j], y[:,j]) else: func(x, y) @@ -372,7 +372,7 @@ func = makefill if multicol: - for j in range(y.shape[1]): + for j in xrange(y.shape[1]): func(x[:,j], y[:,j]) else: func(x, y) @@ -3897,9 +3897,9 @@ pass elif align == 'center': if orientation == 'vertical': - left = [left[i] - width[i]/2. for i in range(len(left))] + left = [left[i] - width[i]/2. for i in xrange(len(left))] elif orientation == 'horizontal': - bottom = [bottom[i] - height[i]/2. for i in range(len(bottom))] + bottom = [bottom[i] - height[i]/2. for i in xrange(len(bottom))] else: raise ValueError, 'invalid alignment: %s' % align @@ -4571,7 +4571,7 @@ elif nc == 1: x = [x.ravel()] else: - x = [x[:,i] for i in range(nc)] + x = [x[:,i] for i in xrange(nc)] else: raise ValueError, "input x can have no more than 2 dimensions" if not hasattr(x[0], '__len__'): @@ -4665,7 +4665,7 @@ else: def doplot(*args): shuffled = [] - for i in range(0, len(args), 3): + for i in xrange(0, len(args), 3): shuffled.extend([args[i+1], args[i], args[i+2]]) return self.plot(*shuffled) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Eric F. <ef...@ha...> - 2008-10-16 19:18:22
|
Manuel, Although it doesn't hurt, I don't think it is worthwhile changing range to xrange. From the 2.5 docs: xrange( [start,] stop[, step]) This function is very similar to range(), but returns an ``xrange object'' instead of a list. This is an opaque sequence type which yields the same values as the corresponding list, without actually storing them all simultaneously. The advantage of xrange() over range() is minimal (since xrange() still has to create the values when asked for them) except when a very large range is used on a memory-starved machine or when all of the range's elements are never used (such as when the loop is usually terminated with break). Note "minimal" advantage. xrange was intended for special-case use, not general use. And from Python 3.0, http://docs.python.org/dev/3.0/whatsnew/3.0.html xrange() renamed to range(), so range() will no longer produce a list but an iterable yielding integers when iterated over. This implies to me that range is the preferred form, and xrange is intended to go away. Eric mme...@us... wrote: > Revision: 6217 > http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6217&view=rev > Author: mmetz_bn > Date: 2008-10-16 11:15:25 +0000 (Thu, 16 Oct 2008) > > Log Message: > ----------- > minor optimizations: replacing range by xrange in for loops > > Modified Paths: > -------------- > trunk/matplotlib/lib/matplotlib/axes.py > > Modified: trunk/matplotlib/lib/matplotlib/axes.py > =================================================================== > --- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-15 20:53:09 UTC (rev 6216) > +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-16 11:15:25 UTC (rev 6217) > @@ -243,7 +243,7 @@ > x, y, multicol = self._xy_from_y(y) > > if multicol: > - for j in range(y.shape[1]): > + for j in xrange(y.shape[1]): > color = self._get_next_cycle_color() > seg = mlines.Line2D(x, y[:,j], > color = color, > @@ -285,7 +285,7 @@ > ret.append(seg) > > if multicol: > - for j in range(y.shape[1]): > + for j in xrange(y.shape[1]): > makeline(x[:,j], y[:,j]) > else: > makeline(x, y) > @@ -324,7 +324,7 @@ > closed = kwargs.get('closed', True) > func = makefill > if multicol: > - for j in range(y.shape[1]): > + for j in xrange(y.shape[1]): > func(x[:,j], y[:,j]) > else: > func(x, y) > @@ -372,7 +372,7 @@ > func = makefill > > if multicol: > - for j in range(y.shape[1]): > + for j in xrange(y.shape[1]): > func(x[:,j], y[:,j]) > else: > func(x, y) > @@ -3897,9 +3897,9 @@ > pass > elif align == 'center': > if orientation == 'vertical': > - left = [left[i] - width[i]/2. for i in range(len(left))] > + left = [left[i] - width[i]/2. for i in xrange(len(left))] > elif orientation == 'horizontal': > - bottom = [bottom[i] - height[i]/2. for i in range(len(bottom))] > + bottom = [bottom[i] - height[i]/2. for i in xrange(len(bottom))] > > else: > raise ValueError, 'invalid alignment: %s' % align > @@ -4571,7 +4571,7 @@ > elif nc == 1: > x = [x.ravel()] > else: > - x = [x[:,i] for i in range(nc)] > + x = [x[:,i] for i in xrange(nc)] > else: > raise ValueError, "input x can have no more than 2 dimensions" > if not hasattr(x[0], '__len__'): > @@ -4665,7 +4665,7 @@ > else: > def doplot(*args): > shuffled = [] > - for i in range(0, len(args), 3): > + for i in xrange(0, len(args), 3): > shuffled.extend([args[i+1], args[i], args[i+2]]) > return self.plot(*shuffled) > > > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-checkins mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins |
From: <mme...@us...> - 2008-10-17 14:27:35
|
Revision: 6239 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6239&view=rev Author: mmetz_bn Date: 2008-10-17 14:27:28 +0000 (Fri, 17 Oct 2008) Log Message: ----------- minor hist and hist docs updates Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-17 14:27:26 UTC (rev 6238) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-17 14:27:28 UTC (rev 6239) @@ -6183,9 +6183,10 @@ Keyword arguments: *bins*: - either an integer number of bins or a sequence giving the - bins. *x* are the data to be binned. *x* can be an array or a - 2D array with multiple data in its columns. Note, if *bins* + Either an integer number of bins or a sequence giving the + bins. *x* are the data to be binned. *x* can be an array, + a 2D array with multiple data in its columns, or a list of + arrays with data of different length. Note, if *bins* is an integer input argument=numbins, *bins* + 1 bin edges will be returned, compatible with the semantics of :func:`numpy.histogram` with the *new* = True argument. @@ -6211,7 +6212,7 @@ gives the counts in that bin plus all bins for smaller values. The last bin gives the total number of datapoints. If *normed* is also *True* then the histogram is normalized such that the - last bin equals one. If *cumulative* evaluates to less than 0 + last bin equals 1. If *cumulative* evaluates to less than 0 (e.g. -1), the direction of accumulation is reversed. In this case, if *normed* is also *True*, then the histogram is normalized such that the first bin equals 1. @@ -6219,13 +6220,14 @@ *histtype*: [ 'bar' | 'barstacked' | 'step' | 'stepfilled' ] The type of histogram to draw. - - 'bar' is a traditional bar-type histogram + - 'bar' is a traditional bar-type histogram. If multiple data + are given the bars are aranged side by side. - 'barstacked' is a bar-type histogram where multiple - data are stacked on top of each other. + data are stacked on top of each other. - 'step' generates a lineplot that is by default - unfilled + unfilled. - 'stepfilled' generates a lineplot that is by default filled. @@ -6233,9 +6235,9 @@ *align*: ['left' | 'mid' | 'right' ] Controls how the histogram is plotted. - - 'left': bars are centered on the left bin edges + - 'left': bars are centered on the left bin edges. - - 'mid': bars are centered between the bin edges + - 'mid': bars are centered between the bin edges. - 'right': bars are centered on the right bin edges. @@ -6245,9 +6247,9 @@ the left edges. *rwidth*: - the relative width of the bars as a fraction of the bin + The relative width of the bars as a fraction of the bin width. If *None*, automatically compute the width. Ignored - if *histtype* = 'step'. + if *histtype* = 'step' or 'stepfilled'. *log*: If *True*, the histogram axis will be set to a log scale. @@ -6280,7 +6282,8 @@ 'hist now uses the rwidth to give relative width and not absolute width') try: - x = np.transpose(np.asarray(x).copy()) + # make sure a copy is created: don't use asarray + x = np.transpose(np.array(x)) if len(x.shape)==1: x.shape = (1,x.shape[0]) elif len(x.shape)==2 and x.shape[1]<x.shape[0]: @@ -6290,7 +6293,7 @@ if iterable(x[0]) and not is_string_like(x[0]): tx = [] for i in xrange(len(x)): - tx.append( np.asarray(x[i]).copy() ) + tx.append( np.array(x[i]) ) x = tx n = [] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2008-10-22 19:43:45
|
Revision: 6301 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6301&view=rev Author: efiring Date: 2008-10-22 19:43:40 +0000 (Wed, 22 Oct 2008) Log Message: ----------- When initializing a shared axes, respect limits already set on master. This is a tentative first step; more will be required. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-22 19:38:46 UTC (rev 6300) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-22 19:43:40 UTC (rev 6301) @@ -501,7 +501,6 @@ self.set_aspect('auto') self.set_adjustable('box') self.set_anchor('C') - self._sharex = sharex self._sharey = sharey if sharex is not None: @@ -523,7 +522,6 @@ self._hold = rcParams['axes.hold'] self._connected = {} # a dict from events to (id, func) self.cla() - # funcs used to format x and y - fall back on major formatters self.fmt_xdata = None self.fmt_ydata = None @@ -798,6 +796,7 @@ def cla(self): 'Clear the current axes' + # Note: this is called by Axes.__init__() self.xaxis.cla() self.yaxis.cla() @@ -805,12 +804,28 @@ self.callbacks = cbook.CallbackRegistry(('xlim_changed', 'ylim_changed')) if self._sharex is not None: + # major and minor are class instances with + # locator and formatter attributes self.xaxis.major = self._sharex.xaxis.major self.xaxis.minor = self._sharex.xaxis.minor + x0, x1 = self._sharex.get_xlim() + self.set_xlim(x0, x1, emit=False) + self.xaxis.set_scale(self._sharex.xaxis.get_scale()) + else: + self.xaxis.set_scale('linear') + if self._sharey is not None: self.yaxis.major = self._sharey.yaxis.major self.yaxis.minor = self._sharey.yaxis.minor + y0, y1 = self._sharex.get_ylim() + self.set_ylim(y0, y1, emit=False) + self.yaxis.set_scale(self._sharey.yaxis.get_scale()) + else: + self.yaxis.set_scale('linear') + self._autoscaleon = True + self._update_transScale() # needed? + self._get_lines = _process_plot_var_args(self) self._get_patches_for_fill = _process_plot_var_args(self, 'fill') @@ -824,10 +839,6 @@ self.legend_ = None self.collections = [] # collection.Collection instances - self._autoscaleon = True - self.set_xscale('linear') - self.set_yscale('linear') - self.grid(self._gridOn) props = font_manager.FontProperties(size=rcParams['axes.titlesize']) @@ -1769,10 +1780,9 @@ def get_xlim(self): """ - Get the x-axis range as a length 2 attay [*xmin*, *xmax*] + Get the x-axis range [*xmin*, *xmax*] """ - # # copy of the viewlim array to avoid modify inplace surprises - return self.viewLim.intervalx.copy() + return tuple(self.viewLim.intervalx) def set_xlim(self, xmin=None, xmax=None, emit=True, **kwargs): """ @@ -1782,7 +1792,7 @@ Set the limits for the xaxis - Returns the current xlimits as a length 2 tuple: (*xmin*, *xmax*) + Returns the current xlimits as a length 2 tuple: [*xmin*, *xmax*] Examples:: @@ -1943,10 +1953,9 @@ def get_ylim(self): """ - Get the y-axis range as a length two array [*ymin*, *ymax*] + Get the y-axis range [*ymin*, *ymax*] """ - # copy of the viewlim array to avoid modify inplace surprises - return self.viewLim.intervaly.copy() + return tuple(self.viewLim.intervaly) def set_ylim(self, ymin=None, ymax=None, emit=True, **kwargs): """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ry...@us...> - 2008-10-23 15:42:45
|
Revision: 6307 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6307&view=rev Author: ryanmay Date: 2008-10-23 15:42:25 +0000 (Thu, 23 Oct 2008) Log Message: ----------- Tweak barbs docstring to point to the appropriate example script. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-23 15:29:50 UTC (rev 6306) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-23 15:42:25 UTC (rev 6307) @@ -5356,13 +5356,19 @@ quiver.__doc__ = mquiver.Quiver.quiver_doc def barbs(self, *args, **kw): + """ + %s + **Example:** + + .. plot:: mpl_examples/pylab_examples/barb_demo.py + """ if not self._hold: self.cla() b = mquiver.Barbs(self, *args, **kw) self.add_collection(b) self.update_datalim(b.get_offsets()) self.autoscale_view() return b - barbs.__doc__ = mquiver.Barbs.barbs_doc + barbs.__doc__ = cbook.dedent(barbs.__doc__) % mquiver.Barbs.barbs_doc def fill(self, *args, **kwargs): """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2008-10-23 17:36:03
|
Revision: 6313 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6313&view=rev Author: mdboom Date: 2008-10-23 17:35:50 +0000 (Thu, 23 Oct 2008) Log Message: ----------- Fix math expression. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-23 17:35:14 UTC (rev 6312) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-23 17:35:50 UTC (rev 6313) @@ -6623,7 +6623,7 @@ .. math:: - C_{xy} = \\frac{|P_{xy}|^2}{P_{xx}*P_{yy}} + C_{xy} = \\frac{|P_{xy}|^2}{P_{xx}P_{yy}} The return value is a tuple (*Cxy*, *f*), where *f* are the frequencies of the coherence vector. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2008-10-24 06:51:38
|
Revision: 6316 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6316&view=rev Author: efiring Date: 2008-10-24 06:51:29 +0000 (Fri, 24 Oct 2008) Log Message: ----------- Make shared axes work better with constrained aspect ratio. This is restricted to the case of adjustable=datalim, and is experimental. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-24 00:08:58 UTC (rev 6315) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-24 06:51:29 UTC (rev 6316) @@ -499,15 +499,24 @@ self._originalPosition = self._position.frozen() self.set_axes(self) self.set_aspect('auto') - self.set_adjustable('box') + self._adjustable = 'box' self.set_anchor('C') self._sharex = sharex self._sharey = sharey if sharex is not None: self._shared_x_axes.join(self, sharex) + if sharex._adjustable == 'box': + sharex._adjustable = 'datalim' + #warnings.warn( + # 'shared axes: "adjustable" is being changed to "datalim"') + self._adjustable = 'datalim' if sharey is not None: self._shared_y_axes.join(self, sharey) - + if sharex._adjustable == 'box': + sharex._adjustable = 'datalim' + #warnings.warn( + # 'shared axes: "adjustable" is being changed to "datalim"') + self._adjustable = 'datalim' self.set_label(label) self.set_figure(fig) @@ -772,6 +781,11 @@ if which in ('both', 'original'): self._originalPosition.set(pos) + def reset_position(self): + 'Make the original position the active position' + pos = self.get_position(original=True) + self.set_position(pos, which='active') + def _set_artist_props(self, a): 'set the boilerplate props for artists added to axes' a.set_figure(self.figure) @@ -992,6 +1006,10 @@ ACCEPTS: [ 'box' | 'datalim' ] """ if adjustable in ('box', 'datalim'): + if self in self._shared_x_axes or self in self._shared_y_axes: + if adjustable == 'box': + raise ValueError( + 'adjustable must be "datalim" for shared axes') self._adjustable = adjustable else: raise ValueError('argument must be "box", or "datalim"') @@ -1043,11 +1061,11 @@ axes box or the view limits. ''' if position is None: - position = self.get_position(True) + position = self.get_position(original=True) aspect = self.get_aspect() if aspect == 'auto': - self.set_position( position , 'active') + self.set_position( position , which='active') return if aspect == 'equal': @@ -1058,7 +1076,10 @@ #Ensure at drawing time that any Axes involved in axis-sharing # does not have its position changed. if self in self._shared_x_axes or self in self._shared_y_axes: - self._adjustable = 'datalim' + if self._adjustable == 'box': + self._adjustable = 'datalim' + warnings.warn( + 'shared axes: "adjustable" is being changed to "datalim"') figW,figH = self.get_figure().get_size_inches() fig_aspect = figH/figW @@ -1069,6 +1090,10 @@ self.set_position(pb1.anchored(self.get_anchor(), pb), 'active') return + # reset active to original in case it had been changed + # by prior use of 'box' + self.set_position(position, which='active') + xmin,xmax = self.get_xbound() xsize = max(math.fabs(xmax-xmin), 1e-30) ymin,ymax = self.get_ybound() @@ -1489,7 +1514,7 @@ if not self.get_visible(): return renderer.open_group('axes') - self.apply_aspect(self.get_position(True)) + self.apply_aspect() # the patch draws the background rectangle -- the frame below # will draw the edges This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2008-10-24 17:40:59
|
Revision: 6326 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6326&view=rev Author: efiring Date: 2008-10-24 17:40:54 +0000 (Fri, 24 Oct 2008) Log Message: ----------- Fix error in recent shared axes changes; thanks to David Trem. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-24 17:35:50 UTC (rev 6325) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-24 17:40:54 UTC (rev 6326) @@ -512,8 +512,8 @@ self._adjustable = 'datalim' if sharey is not None: self._shared_y_axes.join(self, sharey) - if sharex._adjustable == 'box': - sharex._adjustable = 'datalim' + if sharey._adjustable == 'box': + sharey._adjustable = 'datalim' #warnings.warn( # 'shared axes: "adjustable" is being changed to "datalim"') self._adjustable = 'datalim' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2008-10-24 22:35:34
|
Revision: 6329 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6329&view=rev Author: efiring Date: 2008-10-24 22:35:25 +0000 (Fri, 24 Oct 2008) Log Message: ----------- Another typo bug in recent commit for shared axes support Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-24 18:16:12 UTC (rev 6328) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-24 22:35:25 UTC (rev 6329) @@ -831,7 +831,7 @@ if self._sharey is not None: self.yaxis.major = self._sharey.yaxis.major self.yaxis.minor = self._sharey.yaxis.minor - y0, y1 = self._sharex.get_ylim() + y0, y1 = self._sharey.get_ylim() self.set_ylim(y0, y1, emit=False) self.yaxis.set_scale(self._sharey.yaxis.get_scale()) else: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jr...@us...> - 2008-10-31 14:54:45
|
Revision: 6360 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6360&view=rev Author: jrevans Date: 2008-10-31 14:54:42 +0000 (Fri, 31 Oct 2008) Log Message: ----------- Added unit handling for axhspan and axvspan. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-31 13:06:59 UTC (rev 6359) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-31 14:54:42 UTC (rev 6360) @@ -2876,9 +2876,16 @@ .. plot:: mpl_examples/pylab_examples/axhspan_demo.py """ - # convert y axis units trans = mtransforms.blended_transform_factory( self.transAxes, self.transData) + + # process the unit information + self._process_unit_info( [xmin, xmax], [ymin, ymax], **kwargs ) + + # first we need to strip away the units + xmin, xmax = self.convert_xunits( [xmin, xmax] ) + ymin, ymax = self.convert_yunits( [ymin, ymax] ) + verts = (xmin, ymin), (xmin, ymax), (xmax, ymax), (xmax, ymin) p = mpatches.Polygon(verts, **kwargs) p.set_transform(trans) @@ -2923,9 +2930,16 @@ :meth:`axhspan`: for example plot and source code """ - # convert x axis units trans = mtransforms.blended_transform_factory( self.transData, self.transAxes) + + # process the unit information + self._process_unit_info( [xmin, xmax], [ymin, ymax], **kwargs ) + + # first we need to strip away the units + xmin, xmax = self.convert_xunits( [xmin, xmax] ) + ymin, ymax = self.convert_yunits( [ymin, ymax] ) + verts = [(xmin, ymin), (xmin, ymax), (xmax, ymax), (xmax, ymin)] p = mpatches.Polygon(verts, **kwargs) p.set_transform(trans) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2008-11-05 15:15:17
|
Revision: 6364 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6364&view=rev Author: mdboom Date: 2008-11-05 15:15:10 +0000 (Wed, 05 Nov 2008) Log Message: ----------- Minor docstring fix. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-11-05 14:43:29 UTC (rev 6363) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-11-05 15:15:10 UTC (rev 6364) @@ -6931,23 +6931,23 @@ class SubplotBase: """ - Base class for subplots, which are Axes instances with additional - methods to facilitate generating and manipulating a set of Axes - within a figure. + Base class for subplots, which are :class:`Axes` instances with + additional methods to facilitate generating and manipulating a set + of :class:`Axes` within a figure. """ def __init__(self, fig, *args, **kwargs): """ - fig is a figure instance + *fig* is a :class:`matplotlib.figure.Figure` instance. - args is numRows, numCols, plotNum - where the array of subplots in the figure has dimensions - numRows, numCols, and where plotNum is the number of the - subplot being created. plotNum starts at 1 in the upper - right corner and increases to the right. + *args* is the tuple (*numRows*, *numCols*, *plotNum*), where + the array of subplots in the figure has dimensions *numRows*, + *numCols*, and where *plotNum* is the number of the subplot + being created. *plotNum* starts at 1 in the upper right + corner and increases to the right. - If numRows<=numCols<=plotNum<10, args can be the decimal - integer numRows*100 + numCols*10 + plotNum. + If *numRows* <= *numCols* <= *plotNum* < 10, *args* can be the + decimal integer *numRows* * 100 + *numCols* * 10 + *plotNum*. """ self.figure = fig @@ -6982,7 +6982,7 @@ # COVERAGE NOTE: Never used internally or from examples def change_geometry(self, numrows, numcols, num): - 'change subplot geometry, eg from 1,1,1 to 2,2,3' + 'change subplot geometry, eg. from 1,1,1 to 2,2,3' self._rows = numrows self._cols = numcols self._num = num-1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2008-11-08 18:41:30
|
Revision: 6377 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6377&view=rev Author: efiring Date: 2008-11-08 18:41:25 +0000 (Sat, 08 Nov 2008) Log Message: ----------- Fix bugs in unit-handling in axhspan and axvspan Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-11-08 18:33:01 UTC (rev 6376) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-11-08 18:41:25 UTC (rev 6377) @@ -2880,7 +2880,7 @@ self.transAxes, self.transData) # process the unit information - self._process_unit_info( [xmin, xmax], [ymin, ymax], **kwargs ) + self._process_unit_info( [xmin, xmax], [ymin, ymax], kwargs=kwargs ) # first we need to strip away the units xmin, xmax = self.convert_xunits( [xmin, xmax] ) @@ -2934,7 +2934,7 @@ self.transData, self.transAxes) # process the unit information - self._process_unit_info( [xmin, xmax], [ymin, ymax], **kwargs ) + self._process_unit_info( [xmin, xmax], [ymin, ymax], kwargs=kwargs ) # first we need to strip away the units xmin, xmax = self.convert_xunits( [xmin, xmax] ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-11-09 13:17:45
|
Revision: 6382 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6382&view=rev Author: jouni Date: 2008-11-09 13:17:41 +0000 (Sun, 09 Nov 2008) Log Message: ----------- Clarify hist docstring Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-11-09 13:16:39 UTC (rev 6381) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-11-09 13:17:41 UTC (rev 6382) @@ -6243,8 +6243,8 @@ bottom=None, histtype='bar', align='mid', orientation='vertical', rwidth=None, log=False, **kwargs) - Compute the histogram of *x*. The return value is a tuple - (*n*, *bins*, *patches*) or ([*n0*, *n1*, ...], *bins*, + Compute and draw the histogram of *x*. The return value is a + tuple (*n*, *bins*, *patches*) or ([*n0*, *n1*, ...], *bins*, [*patches0*, *patches1*,...]) if the input contains multiple data. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ry...@us...> - 2008-11-10 22:41:35
|
Revision: 6386 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6386&view=rev Author: ryanmay Date: 2008-11-10 22:41:27 +0000 (Mon, 10 Nov 2008) Log Message: ----------- Clean up some of axes.psd() docstring. Add a reference to the psd_demo.py example. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-11-10 18:59:18 UTC (rev 6385) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-11-10 22:41:27 UTC (rev 6386) @@ -6526,7 +6526,7 @@ The power spectral density by Welches average periodogram method. The vector *x* is divided into *NFFT* length segments. Each segment is detrended by function *detrend* and - windowed by function *window*. *noperlap* gives the length of + windowed by function *window*. *noverlap* gives the length of the overlap between segments. The :math:`|\mathrm{fft}(i)|^2` of each segment :math:`i` are averaged to compute *Pxx*, with a scaling to correct for power loss due to windowing. *Fs* is the @@ -6542,7 +6542,7 @@ *Fc*: integer The center frequency of *x* (defaults to 0), which offsets - the yextents of the image to reflect the frequency range used + the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. @@ -6580,6 +6580,10 @@ kwargs control the :class:`~matplotlib.lines.Line2D` properties: %(Line2D)s + + **Example:** + + .. plot:: mpl_examples/pylab_examples/psd_demo.py """ if not self._hold: self.cla() pxx, freqs = mlab.psd(x, NFFT, Fs, detrend, window, noverlap) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |