SourceForge logo
SourceForge logo
Menu

matplotlib-checkins — Commit notification. DO NOT POST to this list, just subscribe to it.

You can subscribe to this list here.

2007 Jan
Feb
Mar
Apr
May
Jun
Jul
(115)
Aug
(120)
Sep
(137)
Oct
(170)
Nov
(461)
Dec
(263)
2008 Jan
(120)
Feb
(74)
Mar
(35)
Apr
(74)
May
(245)
Jun
(356)
Jul
(240)
Aug
(115)
Sep
(78)
Oct
(225)
Nov
(98)
Dec
(271)
2009 Jan
(132)
Feb
(84)
Mar
(74)
Apr
(56)
May
(90)
Jun
(79)
Jul
(83)
Aug
(296)
Sep
(214)
Oct
(76)
Nov
(82)
Dec
(66)
2010 Jan
(46)
Feb
(58)
Mar
(51)
Apr
(77)
May
(58)
Jun
(126)
Jul
(128)
Aug
(64)
Sep
(50)
Oct
(44)
Nov
(48)
Dec
(54)
2011 Jan
(68)
Feb
(52)
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
(1)
2018 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S

1
(4)
2
3
(2)
4
(3)
5
(5)
6
(1)
7
(3)
8
9
(3)
10
(3)
11
(6)
12
(2)
13
(4)
14
(1)
15
(2)
16
(1)
17
(6)
18
(8)
19
20
(1)
21
22
23
(3)
24
(2)
25
(2)
26
(1)
27
(2)
28
(7)
29
(2)
30
(4)




Showing 5 results of 5

Revision: 6070
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6070&view=rev
Author: jswhit
Date: 2008年09月05日 15:37:01 +0000 (2008年9月05日)
Log Message:
-----------
allow for 'cache' option when accessing remote datasets.
Modified Paths:
--------------
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/netcdf.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年09月05日 13:23:21 UTC (rev 6069)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年09月05日 15:37:01 UTC (rev 6070)
@@ -3646,7 +3646,8 @@
 else:
 return corners
 
-def NetCDFFile(file, mode='r', maskandscale=True, username=None, password=None):
+def NetCDFFile(file, mode='r', maskandscale=True, cache=None,\
+ username=None, password=None, verbose=False):
 """NetCDF File reader/writer. API is the same as Scientific.IO.NetCDF.
 
 If ``file`` is a URL that starts with `http`, it is assumed
@@ -3666,9 +3667,17 @@
 To suppress these automatic conversions, set the ``maskandscale``
 keyword to False. 
 
+ The keywords ``cache``, ``username``, ``password`` and ``verbose`` are only
+ valid for remote OPenDAP datasets. ``username`` and ``password`` are used 
+ to access OPenDAP datasets that require authentication. ``verbose=True``
+ will make the pydap client print out the URLs being accessed.
+ ``cache`` is a location (a directory) for caching data, so that repeated
+ accesses to the same URL avoid the network. 
+
 """
 if file.startswith('http'):
- return netcdf._RemoteFile(file,maskandscale=maskandscale,username=username,password=password)
+ return netcdf._RemoteFile(file,maskandscale=maskandscale,\
+ cache=cache,username=username,password=password,verbose=verbose)
 else:
 return netcdf.netcdf_file(file,mode=mode,maskandscale=maskandscale)
 
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/netcdf.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/netcdf.py	2008年09月05日 13:23:21 UTC (rev 6069)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/netcdf.py	2008年09月05日 15:37:01 UTC (rev 6070)
@@ -8,8 +8,10 @@
 class _RemoteFile(object):
 """A NetCDF file reader. API is the same as Scientific.IO.NetCDF."""
 
- def __init__(self, file, maskandscale=False, username=None, password=None):
- self._buffer = open_remote(file,username=username,password=password)
+ def __init__(self, file, maskandscale=False, cache=None,\
+ username=None, password=None, verbose=False):
+ self._buffer = open_remote(file,cache=cache,\
+ username=username,password=password,verbose=verbose)
 self._maskandscale = maskandscale
 self._parse()
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年09月05日 13:23:25
Revision: 6069
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6069&view=rev
Author: mdboom
Date: 2008年09月05日 13:23:21 +0000 (2008年9月05日)
Log Message:
-----------
Merged revisions 5946-6068 via svnmerge from 
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_91_maint
........
r6050 | mdboom | 2008年08月25日 18:21:49 -0400 (2008年8月25日) | 2 lines
Fix locale problems in SVG backend (thanks, Mathieu Leplatre for reporting)
........
Property Changed:
----------------
 trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
 - /branches/v0_91_maint:1-5945
 + /branches/v0_91_maint:1-6068
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年09月05日 13:15:26
Revision: 6068
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6068&view=rev
Author: mdboom
Date: 2008年09月05日 13:15:20 +0000 (2008年9月05日)
Log Message:
-----------
Fix hatching in Postscript backend.
Modified Paths:
--------------
 trunk/matplotlib/CHANGELOG
 trunk/matplotlib/lib/matplotlib/backends/backend_ps.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2008年09月05日 03:23:30 UTC (rev 6067)
+++ trunk/matplotlib/CHANGELOG	2008年09月05日 13:15:20 UTC (rev 6068)
@@ -1,3 +1,5 @@
+2008年09月05日 Fix hatching in PS backend - MGD
+
 2008年09月03日 Fix log with base 2 - MGD
 
 2008年09月01日 Added support for bilinear interpolation in
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_ps.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_ps.py	2008年09月05日 03:23:30 UTC (rev 6067)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_ps.py	2008年09月05日 13:15:20 UTC (rev 6068)
@@ -800,10 +800,6 @@
 write(ps.strip())
 write("\n")
 
- hatch = gc.get_hatch()
- if hatch:
- self.set_hatch(hatch)
-
 if fill:
 if stroke:
 write("gsave\n")
@@ -812,6 +808,11 @@
 else:
 self.set_color(store=0, *rgbFace[:3])
 write("fill\n")
+
+ hatch = gc.get_hatch()
+ if hatch:
+ self.set_hatch(hatch)
+
 if stroke:
 write("stroke\n")
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2008年09月05日 03:23:32
Revision: 6067
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6067&view=rev
Author: efiring
Date: 2008年09月05日 03:23:30 +0000 (2008年9月05日)
Log Message:
-----------
Improve masked array support in collections and quiver
Modified Paths:
--------------
 trunk/matplotlib/examples/pylab_examples/line_collection.py
 trunk/matplotlib/lib/matplotlib/collections.py
 trunk/matplotlib/lib/matplotlib/quiver.py
Modified: trunk/matplotlib/examples/pylab_examples/line_collection.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/line_collection.py	2008年09月05日 02:02:49 UTC (rev 6066)
+++ trunk/matplotlib/examples/pylab_examples/line_collection.py	2008年09月05日 03:23:30 UTC (rev 6067)
@@ -1,33 +1,42 @@
-from pylab import *
+import matplotlib.pyplot as plt
 from matplotlib.collections import LineCollection
-from matplotlib.colors import ColorConverter
-colorConverter = ColorConverter()
+from matplotlib.colors import colorConverter
 
+import numpy as np
+
 # In order to efficiently plot many lines in a single set of axes,
 # Matplotlib has the ability to add the lines all at once. Here is a
 # simple example showing how it is done.
 
-x = arange(200)
+x = np.arange(100)
 # Here are many sets of y to plot vs x
-ys = [x+i for i in x]
+ys = x[:50, np.newaxis] + x[np.newaxis, :]
 
-# We need to set the plot limits, the will not autoscale
-ax = axes()
-ax.set_xlim((amin(x),amax(x)))
-ax.set_ylim((amin(amin(ys)),amax(amax(ys))))
+segs = np.zeros((50, 100, 2), float)
+segs[:,:,1] = ys
+segs[:,:,0] = x
 
+# Mask some values to test masked array support:
+segs = np.ma.masked_where((segs > 50) & (segs < 60), segs)
+
+# We need to set the plot limits.
+ax = plt.axes()
+ax.set_xlim(x.min(), x.max())
+ax.set_ylim(ys.min(), ys.max())
+
 # colors is sequence of rgba tuples
 # linestyle is a string or dash tuple. Legal string values are
 # solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq)
 # where onoffseq is an even length tuple of on and off ink in points.
 # If linestyle is omitted, 'solid' is used
 # See matplotlib.collections.LineCollection for more information
-line_segments = LineCollection([zip(x,y) for y in ys], # Make a sequence of x,y pairs
+line_segments = LineCollection(segs,
 linewidths = (0.5,1,1.5,2),
 colors = [colorConverter.to_rgba(i) \
 for i in ('b','g','r','c','m','y','k')],
 linestyle = 'solid')
 ax.add_collection(line_segments)
-show()
+ax.set_title('Line collection with masked arrays')
+plt.show()
 
 
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py	2008年09月05日 02:02:49 UTC (rev 6066)
+++ trunk/matplotlib/lib/matplotlib/collections.py	2008年09月05日 03:23:30 UTC (rev 6067)
@@ -602,9 +602,13 @@
 if closed:
 self._paths = []
 for xy in verts:
- xy = np.asarray(xy)
- if len(xy) and (xy[0] != xy[-1]).any():
- xy = np.concatenate([xy, [xy[0]]])
+ if np.ma.isMaskedArray(xy):
+ if len(xy) and (xy[0] != xy[-1]).any():
+ xy = np.ma.concatenate([xy, [xy[0]]])
+ else:
+ xy = np.asarray(xy)
+ if len(xy) and (xy[0] != xy[-1]).any():
+ xy = np.concatenate([xy, [xy[0]]])
 self._paths.append(mpath.Path(xy))
 else:
 self._paths = [mpath.Path(xy) for xy in verts]
@@ -819,10 +823,14 @@
 
 def set_segments(self, segments):
 if segments is None: return
- segments = [np.asarray(seg, np.float_) for seg in segments]
+ _segments = []
+ for seg in segments:
+ if not np.ma.isMaskedArray(seg):
+ seg = np.asarray(seg, np.float_)
+ _segments.append(seg)
 if self._uniform_offsets is not None:
- segments = self._add_offsets(segments)
- self._paths = [mpath.Path(seg) for seg in segments]
+ _segments = self._add_offsets(_segments)
+ self._paths = [mpath.Path(seg) for seg in _segments]
 
 set_verts = set_segments # for compatibility with PolyCollection
 
Modified: trunk/matplotlib/lib/matplotlib/quiver.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/quiver.py	2008年09月05日 02:02:49 UTC (rev 6066)
+++ trunk/matplotlib/lib/matplotlib/quiver.py	2008年09月05日 03:23:30 UTC (rev 6067)
@@ -57,7 +57,7 @@
 match the column and row dimensions of *U*, then *X* and *Y* will be
 expanded with :func:`numpy.meshgrid`.
 
-*U*, *V*, *C* may be masked arrays, but masked *X*, ** are not
+*U*, *V*, *C* may be masked arrays, but masked *X*, *Y* are not
 supported at present.
 
 Keyword arguments:
@@ -334,12 +334,6 @@
 def __init__(self, ax, *args, **kw):
 self.ax = ax
 X, Y, U, V, C = self._parse_args(*args)
- if C is not None:
- X, Y, U, V, C = delete_masked_points(X.ravel(),Y.ravel(),U.ravel(),
- V.ravel(),C.ravel())
- else:
- X, Y, U, V = delete_masked_points(X.ravel(),Y.ravel(),U.ravel(),
- V.ravel())
 self.X = X
 self.Y = Y
 self.XY = np.hstack((X[:,np.newaxis], Y[:,np.newaxis]))
@@ -357,7 +351,9 @@
 kw.setdefault('facecolors', self.color)
 kw.setdefault('linewidths', (0,))
 collections.PolyCollection.__init__(self, [], offsets=self.XY,
- transOffset=ax.transData, **kw)
+ transOffset=ax.transData,
+ closed=False,
+ **kw)
 self.polykw = kw
 self.set_UVC(U, V, C)
 self._initialized = False
@@ -420,7 +416,7 @@
 self._init()
 if self._new_UV:
 verts = self._make_verts(self.U, self.V)
- self.set_verts(verts)
+ self.set_verts(verts, closed=False)
 self._new_UV = False
 collections.PolyCollection.draw(self, renderer)
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6066
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6066&view=rev
Author: jswhit
Date: 2008年09月05日 02:02:49 +0000 (2008年9月05日)
Log Message:
-----------
allow for username and password for remote opendap datasets.
Modified Paths:
--------------
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/netcdf.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年09月04日 19:56:37 UTC (rev 6065)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年09月05日 02:02:49 UTC (rev 6066)
@@ -3646,7 +3646,7 @@
 else:
 return corners
 
-def NetCDFFile(file, mode='r', maskandscale=True):
+def NetCDFFile(file, mode='r', maskandscale=True, username=None, password=None):
 """NetCDF File reader/writer. API is the same as Scientific.IO.NetCDF.
 
 If ``file`` is a URL that starts with `http`, it is assumed
@@ -3668,7 +3668,7 @@
 
 """
 if file.startswith('http'):
- return netcdf._RemoteFile(file,maskandscale=maskandscale)
+ return netcdf._RemoteFile(file,maskandscale=maskandscale,username=username,password=password)
 else:
 return netcdf.netcdf_file(file,mode=mode,maskandscale=maskandscale)
 
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/netcdf.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/netcdf.py	2008年09月04日 19:56:37 UTC (rev 6065)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/netcdf.py	2008年09月05日 02:02:49 UTC (rev 6066)
@@ -8,8 +8,8 @@
 class _RemoteFile(object):
 """A NetCDF file reader. API is the same as Scientific.IO.NetCDF."""
 
- def __init__(self, file, maskandscale=False):
- self._buffer = open_remote(file)
+ def __init__(self, file, maskandscale=False, username=None, password=None):
+ self._buffer = open_remote(file,username=username,password=password)
 self._maskandscale = maskandscale
 self._parse()
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing 5 results of 5

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 によって変換されたページ (->オリジナル) /