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 2 results of 2

From: <md...@us...> - 2008年09月03日 19:58:09
Revision: 6062
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6062&view=rev
Author: mdboom
Date: 2008年09月03日 19:58:01 +0000 (2008年9月03日)
Log Message:
-----------
Add donut demo (to demonstrate compound paths)
Modified Paths:
--------------
 trunk/matplotlib/examples/tests/backend_driver.py
Added Paths:
-----------
 trunk/matplotlib/examples/api/donut_demo.py
Added: trunk/matplotlib/examples/api/donut_demo.py
===================================================================
--- trunk/matplotlib/examples/api/donut_demo.py	 (rev 0)
+++ trunk/matplotlib/examples/api/donut_demo.py	2008年09月03日 19:58:01 UTC (rev 6062)
@@ -0,0 +1,54 @@
+import numpy as np
+import matplotlib.path as mpath
+import matplotlib.patches as mpatches
+import matplotlib.pyplot as plt
+
+def wise(v):
+ if v == 1:
+ return "CCW"
+ else:
+ return "CW"
+
+def make_circle(r):
+ t = np.arange(0, np.pi * 2.0, 0.01)
+ t = t.reshape((len(t), 1))
+ x = r * np.cos(t)
+ y = r * np.sin(t)
+ return np.hstack((x, y))
+
+Path = mpath.Path
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+
+inside_vertices = make_circle(0.5)
+outside_vertices = make_circle(1.0)
+codes = np.ones(len(inside_vertices), dtype=mpath.Path.code_type) * mpath.Path.LINETO
+codes[0] = mpath.Path.MOVETO
+
+for i, (inside, outside) in enumerate(((1, 1), (1, -1), (-1, 1), (-1, -1))):
+ # Concatenate the inside and outside subpaths together, changing their
+ # order as needed
+ vertices = np.concatenate((outside_vertices[::outside],
+ inside_vertices[::inside]))
+ # Shift the path
+ vertices[:, 0] += i * 2.5
+ # The codes will be all "LINETO" commands, except for "MOVETO"s at the
+ # beginning of each subpath
+ all_codes = np.concatenate((codes, codes))
+ # Create the Path object
+ path = mpath.Path(vertices, all_codes)
+ # Add plot it
+ patch = mpatches.PathPatch(path, facecolor='#885500', edgecolor='black')
+ ax.add_patch(patch)
+
+ ax.annotate("Outside %s,\nInside %s" % (wise(outside), wise(inside)),
+ (i * 2.5, -1.5), va="top", ha="center")
+
+ax.set_xlim(-2,10)
+ax.set_ylim(-3,2)
+ax.set_title('Mmm, donuts!')
+ax.set_aspect(1.0)
+plt.show()
+
+
Modified: trunk/matplotlib/examples/tests/backend_driver.py
===================================================================
--- trunk/matplotlib/examples/tests/backend_driver.py	2008年09月03日 19:15:22 UTC (rev 6061)
+++ trunk/matplotlib/examples/tests/backend_driver.py	2008年09月03日 19:58:01 UTC (rev 6062)
@@ -126,6 +126,8 @@
 api_files = [
 'colorbar_only.py',
 'color_cycle.py',
+ 'donut_demo.py',
+ 'path_patch_demo.py'
 ]
 
 units_dir = os.path.join('..', 'units')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年09月03日 19:15:30
Revision: 6061
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6061&view=rev
Author: mdboom
Date: 2008年09月03日 19:15:22 +0000 (2008年9月03日)
Log Message:
-----------
[ 2091036 ] Using log axes with base 2 fails
Modified Paths:
--------------
 trunk/matplotlib/CHANGELOG
 trunk/matplotlib/lib/matplotlib/scale.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2008年09月01日 22:50:47 UTC (rev 6060)
+++ trunk/matplotlib/CHANGELOG	2008年09月03日 19:15:22 UTC (rev 6061)
@@ -1,3 +1,5 @@
+2008年09月03日 Fix log with base 2 - MGD
+
 2008年09月01日 Added support for bilinear interpolation in
 NonUniformImage; patch by Gregory Lielens. - EF
 
Modified: trunk/matplotlib/lib/matplotlib/scale.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/scale.py	2008年09月01日 22:50:47 UTC (rev 6060)
+++ trunk/matplotlib/lib/matplotlib/scale.py	2008年09月03日 19:15:22 UTC (rev 6061)
@@ -91,7 +91,7 @@
 def transform(self, a):
 a = _mask_non_positives(a * 2.0)
 if isinstance(a, MaskedArray):
- return ma.log2(a)
+ return ma.log(a) / np.log(2)
 return np.log2(a)
 
 def inverted(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing 2 results of 2

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