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
(5)
2
(4)
3
(2)
4
(4)
5
(2)
6
(32)
7
(34)
8
(19)
9
(6)
10
(7)
11
(14)
12
(1)
13
(2)
14
(8)
15
(5)
16
(5)
17
(8)
18
(8)
19
(6)
20
(9)
21
(12)
22
(1)
23
(2)
24
(8)
25
(2)
26
(1)
27
(2)
28
(3)
29
30
(2)



Showing 5 results of 5

From: <js...@us...> - 2009年09月01日 14:45:03
Revision: 7626
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7626&view=rev
Author: jswhit
Date: 2009年09月01日 14:44:50 +0000 (2009年9月01日)
Log Message:
-----------
mask data outside plot region in contourf
Modified Paths:
--------------
 trunk/toolkits/basemap/Changelog
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog	2009年09月01日 14:06:35 UTC (rev 7625)
+++ trunk/toolkits/basemap/Changelog	2009年09月01日 14:44:50 UTC (rev 7626)
@@ -1,4 +1,6 @@
 version 0.99.5 (not yet released)
+ * in contourf method, mask data outside map projection region
+ (this prevents contourf from erroneously filling entire map).
 * added 'nightshade' method to shade night regions on a map.
 'daynight.py' example added to illustrate usage.
 * added lonmin, lonmax instance variables.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2009年09月01日 14:06:43
Revision: 7625
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7625&view=rev
Author: mdehoon
Date: 2009年09月01日 14:06:35 +0000 (2009年9月01日)
Log Message:
-----------
Adding calls to gc.restore() whenever new_gc is called. This is necessary for the Mac OS X and the Cairo backend to work correctly. Also, updating the Mac OS X backend to be consistent with recent changes in SVN. See issue 2844845 on sourceforge.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/axes.py
 trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py
 trunk/matplotlib/lib/matplotlib/collections.py
 trunk/matplotlib/lib/matplotlib/figure.py
 trunk/matplotlib/lib/matplotlib/image.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2009年09月01日 13:03:20 UTC (rev 7624)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2009年09月01日 14:06:35 UTC (rev 7625)
@@ -1749,6 +1749,7 @@
 self.patch.get_transform()))
 
 renderer.draw_image(gc, round(l), round(b), im)
+ gc.restore()
 
 if dsu_rasterized:
 for zorder, i, a in dsu_rasterized:
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py	2009年09月01日 13:03:20 UTC (rev 7624)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py	2009年09月01日 14:06:35 UTC (rev 7625)
@@ -58,21 +58,42 @@
 rgbFace = tuple(rgbFace)
 gc.draw_markers(marker_path, marker_trans, path, trans, rgbFace)
 
- def draw_path_collection(self, *args):
- # TODO: We should change this in the C code eventually, but this
- # re-ordering of arguments should work for now
- gc = args[0]
- args = tuple([gc, args[1], gc.get_clip_rectangle()] + \
- list(gc.get_clip_path()) + list(args[2:]))
- gc.draw_path_collection(*args)
+ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
+ offsets, offsetTrans, facecolors, edgecolors,
+ linewidths, linestyles, antialiaseds, urls):
+ cliprect = gc.get_clip_rectangle()
+ clippath, clippath_transform = gc.get_clip_path()
+ gc.draw_path_collection(master_transform,
+ cliprect,
+ clippath,
+ clippath_transform,
+ paths,
+ all_transforms,
+ offsets,
+ offsetTrans,
+ facecolors,
+ edgecolors,
+ linewidths,
+ linestyles,
+ antialiaseds)
 
- def draw_quad_mesh(self, *args):
- # TODO: We should change this in the C code eventually, but this
- # re-ordering of arguments should work for now
- gc = args[0]
- args = [gc, args[1], gc.get_clip_rectangle()] + \
- list(gc.get_clip_path()) + list(args[2:])
- gc.draw_quad_mesh(*args)
+ def draw_quad_mesh(self, gc, master_transform, meshWidth, meshHeight,
+ coordinates, offsets, offsetTrans, facecolors,
+ antialiased, showedges):
+ cliprect = gc.get_clip_rectangle()
+ clippath, clippath_transform = gc.get_clip_path()
+ gc.draw_quad_mesh(master_transform,
+ cliprect,
+ clippath,
+ clippath_transform,
+ meshWidth,
+ meshHeight,
+ coordinates,
+ offsets,
+ offsetTrans,
+ facecolors,
+ antialiased,
+ showedges)
 
 def new_gc(self):
 self.gc.save()
@@ -80,8 +101,6 @@
 return self.gc
 
 def draw_image(self, gc, x, y, im):
- # TODO: We should change this in the C code eventually, but this
- # re-ordering of arguments should work for now
 im.flipud_out()
 nrows, ncols, data = im.as_rgba_str()
 gc.draw_image(x, y, nrows, ncols, data, gc.get_clip_rectangle(),
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py	2009年09月01日 13:03:20 UTC (rev 7624)
+++ trunk/matplotlib/lib/matplotlib/collections.py	2009年09月01日 14:06:35 UTC (rev 7625)
@@ -214,6 +214,8 @@
 gc, transform.frozen(), paths, self.get_transforms(),
 offsets, transOffset, self.get_facecolor(), self.get_edgecolor(),
 self._linewidths, self._linestyles, self._antialiaseds, self._urls)
+
+ gc.restore()
 renderer.close_group(self.__class__.__name__)
 
 def contains(self, mouseevent):
@@ -1223,6 +1225,7 @@
 gc, transform.frozen(), self._meshWidth, self._meshHeight,
 coordinates, offsets, transOffset, self.get_facecolor(),
 self._antialiased, self._showedges)
+ gc.restore()
 renderer.close_group(self.__class__.__name__)
 
 
Modified: trunk/matplotlib/lib/matplotlib/figure.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/figure.py	2009年09月01日 13:03:20 UTC (rev 7624)
+++ trunk/matplotlib/lib/matplotlib/figure.py	2009年09月01日 14:06:35 UTC (rev 7625)
@@ -766,6 +766,7 @@
 gc.set_clip_rectangle(self.bbox)
 gc.set_clip_path(self.get_clip_path())
 renderer.draw_image(gc, l, b, im)
+ gc.restore()
 
 # render the axes
 for a in self.axes: a.draw(renderer)
Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py	2009年09月01日 13:03:20 UTC (rev 7624)
+++ trunk/matplotlib/lib/matplotlib/image.py	2009年09月01日 14:06:35 UTC (rev 7625)
@@ -142,6 +142,7 @@
 gc.set_clip_rectangle(self.axes.bbox.frozen())
 gc.set_clip_path(self.get_clip_path())
 renderer.draw_image(gc, l, b, im)
+ gc.restore()
 
 def contains(self, mouseevent):
 """
@@ -637,6 +638,7 @@
 round(self.axes.bbox.xmin),
 round(self.axes.bbox.ymin),
 im)
+ gc.restore()
 
 
 def set_data(self, x, y, A):
@@ -790,6 +792,7 @@
 gc.set_clip_rectangle(self.figure.bbox)
 gc.set_clip_path(self.get_clip_path())
 renderer.draw_image(gc, round(self.ox), round(self.oy), im)
+ gc.restore()
 
 def write_png(self, fname):
 """Write the image to png file with fname"""
@@ -931,6 +934,7 @@
 self._set_gc_clip(gc)
 #gc.set_clip_path(self.get_clip_path())
 renderer.draw_image(gc, round(l), round(b), im)
+ gc.restore()
 
 
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2009年09月01日 13:22:32
Revision: 7623
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7623&view=rev
Author: mdboom
Date: 2009年09月01日 12:13:12 +0000 (2009年9月01日)
Log Message:
-----------
Add CHANGELOG entry about Gouraud shading
Modified Paths:
--------------
 trunk/matplotlib/CHANGELOG
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2009年09月01日 05:24:38 UTC (rev 7622)
+++ trunk/matplotlib/CHANGELOG	2009年09月01日 12:13:12 UTC (rev 7623)
@@ -1,3 +1,6 @@
+2009年09月01日 Added support for Gouraud interpolated triangles.
+ pcolormesh now accepts shading='gouraud' as an option. - MGD
+
 2009年08月29日 Added matplotlib.testing package, which contains a Nose
 plugin and a decorator that lets tests be marked as
 KnownFailures - ADS
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7624
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7624&view=rev
Author: mdboom
Date: 2009年09月01日 13:03:20 +0000 (2009年9月01日)
Log Message:
-----------
Use numpy to generate the PDF shading triangles stream, which should be faster and more portable than using struct.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py	2009年09月01日 12:13:12 UTC (rev 7623)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py	2009年09月01日 13:03:20 UTC (rev 7624)
@@ -17,7 +17,6 @@
 from cStringIO import StringIO
 from datetime import datetime
 from math import ceil, cos, floor, pi, sin
-import struct
 try:
 set
 except NameError:
@@ -1068,11 +1067,10 @@
 gouraudDict[name] = ob
 shape = points.shape
 flat_points = points.reshape((shape[0] * shape[1], 2))
+ flat_colors = colors.reshape((shape[0] * shape[1], 4))
 points_min = npy.min(flat_points, axis=0) - (1 << 8)
 points_max = npy.max(flat_points, axis=0) + (1 << 8)
 factor = float(0xffffffff) / (points_max - points_min)
- adjpoints = npy.array((points - points_min) * factor, dtype=npy.uint32)
- adjcolors = npy.array(colors * 255.0, dtype=npy.uint8)
 
 self.beginStream(
 ob.id, None,
@@ -1087,10 +1085,16 @@
 0, 1, 0, 1, 0, 1]
 })
 
- for tpoints, tcolors in zip(adjpoints, adjcolors):
- for p, c in zip(tpoints, tcolors):
- values = [int(x) for x in [0] + list(p) + list(c[:3])]
- self.write(struct.pack('>BLLBBB', *values))
+ streamarr = npy.empty(
+ (shape[0] * shape[1],),
+ dtype=[('flags', 'u1'),
+ ('points', '>u4', (2,)),
+ ('colors', 'u1', (3,))])
+ streamarr['flags'] = 0
+ streamarr['points'] = (flat_points - points_min) * factor
+ streamarr['colors'] = flat_colors[:, :3] * 255.0
+
+ self.write(streamarr.tostring())
 self.endStream()
 self.writeObject(self.gouraudObject, gouraudDict)
 
@@ -1375,11 +1379,20 @@
 colors.reshape((1, 3, 4)), trans)
 
 def draw_gouraud_triangles(self, gc, points, colors, trans):
+ assert len(points) == len(colors)
+ assert points.ndim == 3
+ assert points.shape[1] == 3
+ assert points.shape[2] == 2
+ assert colors.ndim == 3
+ assert colors.shape[1] == 3
+ assert colors.shape[2] == 4
+
 shape = points.shape
 points = points.reshape((shape[0] * shape[1], 2))
 tpoints = trans.transform(points)
 tpoints = tpoints.reshape(shape)
 name = self.file.addGouraudTriangles(tpoints, colors)
+ self.check_gc(gc)
 self.file.output(name, Op.shading)
 
 def _setup_textpos(self, x, y, descent, angle, oldx=0, oldy=0, olddescent=0, oldangle=0):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7622
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7622&view=rev
Author: jouni
Date: 2009年09月01日 05:24:38 +0000 (2009年9月01日)
Log Message:
-----------
Small fix to Gouraud triangles in pdf
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py	2009年08月31日 20:10:35 UTC (rev 7621)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py	2009年09月01日 05:24:38 UTC (rev 7622)
@@ -141,6 +141,11 @@
 r = "%.10f" % obj
 return r.rstrip('0').rstrip('.')
 
+ # Booleans. Needs to be tested before integers since
+ # isinstance(True, int) is true.
+ elif isinstance(obj, bool):
+ return ['false', 'true'][obj]
+
 # Integers are written as such.
 elif isinstance(obj, (int, long)):
 return "%d" % obj
@@ -170,10 +175,6 @@
 r.append("]")
 return fill(r)
 
- # Booleans.
- elif isinstance(obj, bool):
- return ['false', 'true'][obj]
-
 # The null keyword.
 elif obj is None:
 return 'null'
@@ -1080,7 +1081,7 @@
 'BitsPerComponent': 8,
 'BitsPerFlag': 8,
 'ColorSpace': Name('DeviceRGB'),
- 'AntiAlias': 1,
+ 'AntiAlias': True,
 'Decode': [points_min[0], points_max[0],
 points_min[1], points_max[1],
 0, 1, 0, 1, 0, 1]
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 によって変換されたページ (->オリジナル) /