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




Showing 6 results of 6

Revision: 7183
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7183&view=rev
Author: leejjoon
Date: 2009年06月05日 23:45:53 +0000 (2009年6月05日)
Log Message:
-----------
axes_grid/clip_path.py : fix math domain error
Modified Paths:
--------------
 trunk/matplotlib/lib/mpl_toolkits/axes_grid/clip_path.py
Modified: trunk/matplotlib/lib/mpl_toolkits/axes_grid/clip_path.py
===================================================================
--- trunk/matplotlib/lib/mpl_toolkits/axes_grid/clip_path.py	2009年06月05日 16:53:47 UTC (rev 7182)
+++ trunk/matplotlib/lib/mpl_toolkits/axes_grid/clip_path.py	2009年06月05日 23:45:53 UTC (rev 7183)
@@ -1,6 +1,12 @@
 import numpy as np
-from math import degrees, atan2
+from math import degrees
+import math
 
+def atan2(dy, dx):
+ if dx == 0 and dx == 0:
+ return 0
+ else:
+ return math.atan2(dy, dx)
 
 # FIXME : The current algorithm seems to return incorrect angle when the line
 # ends at the boudnary.
@@ -38,6 +44,10 @@
 ns = -1
 segx, segy = [], []
 
+ if dx == 0. and dy == 0:
+ dx = x[+1] - x[i]
+ dy = y[i+1] - y[i]
+
 a = degrees(atan2(dy, dx))
 _pos_angles.append((x0, y0, a))
 
@@ -48,6 +58,10 @@
 segx, segy = [x0], [y0]
 ns = i+1
 
+ if dx == 0. and dy == 0:
+ dx = x[+1] - x[i]
+ dy = y[i+1] - y[i]
+
 a = degrees(atan2(dy, dx))
 _pos_angles.append((x0, y0, a))
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7182
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7182&view=rev
Author: jdh2358
Date: 2009年06月05日 16:53:47 +0000 (2009年6月05日)
Log Message:
-----------
updated backend driver to find the new fill_between examples
Modified Paths:
--------------
 trunk/matplotlib/examples/tests/backend_driver.py
Modified: trunk/matplotlib/examples/tests/backend_driver.py
===================================================================
--- trunk/matplotlib/examples/tests/backend_driver.py	2009年06月05日 16:53:11 UTC (rev 7181)
+++ trunk/matplotlib/examples/tests/backend_driver.py	2009年06月05日 16:53:47 UTC (rev 7182)
@@ -86,7 +86,7 @@
 'figimage_demo.py',
 'figlegend_demo.py',
 'figure_title.py',
- 'fill_between.py',
+ 'fill_between_demo.py',
 'fill_demo.py',
 'fill_demo2.py',
 'fill_spiral.py',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年06月05日 16:53:13
Revision: 7181
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7181&view=rev
Author: jdh2358
Date: 2009年06月05日 16:53:11 +0000 (2009年6月05日)
Log Message:
-----------
renamed fill_between.py and fill_betweenx.py to have _demo postfix
Added Paths:
-----------
 trunk/matplotlib/examples/pylab_examples/fill_between_demo.py
 trunk/matplotlib/examples/pylab_examples/fill_betweenx_demo.py
Removed Paths:
-------------
 trunk/matplotlib/examples/pylab_examples/fill_between.py
 trunk/matplotlib/examples/pylab_examples/fill_betweenx.py
Deleted: trunk/matplotlib/examples/pylab_examples/fill_between.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/fill_between.py	2009年06月05日 16:51:21 UTC (rev 7180)
+++ trunk/matplotlib/examples/pylab_examples/fill_between.py	2009年06月05日 16:53:11 UTC (rev 7181)
@@ -1,67 +0,0 @@
-#!/usr/bin/env python
-import matplotlib.mlab as mlab
-from matplotlib.pyplot import figure, show
-import numpy as np
-
-x = np.arange(0.0, 2, 0.01)
-y1 = np.sin(2*np.pi*x)
-y2 = 1.2*np.sin(4*np.pi*x)
-
-fig = figure()
-ax1 = fig.add_subplot(311)
-ax2 = fig.add_subplot(312, sharex=ax1)
-ax3 = fig.add_subplot(313, sharex=ax1)
-
-ax1.fill_between(x, 0, y1)
-ax1.set_ylabel('between y1 and 0')
-
-ax2.fill_between(x, y1, 1)
-ax2.set_ylabel('between y1 and 1')
-
-ax3.fill_between(x, y1, y2)
-ax3.set_ylabel('between y1 and y2')
-ax3.set_xlabel('x')
-
-# now fill between y1 and y2 where a logical condition is met. Note
-# this is different than calling
-# fill_between(x[where], y1[where],y2[where]
-# because of edge effects over multiple contiguous regions.
-fig = figure()
-ax = fig.add_subplot(211)
-ax.plot(x, y1, x, y2, color='black')
-ax.fill_between(x, y1, y2, where=y2>=y1, facecolor='green')
-ax.fill_between(x, y1, y2, where=y2<=y1, facecolor='red')
-ax.set_title('fill between where')
-
-# Test support for masked arrays.
-y2 = np.ma.masked_greater(y2, 1.0)
-ax1 = fig.add_subplot(212, sharex=ax)
-ax1.plot(x, y1, x, y2, color='black')
-ax1.fill_between(x, y1, y2, where=y2>=y1, facecolor='green')
-ax1.fill_between(x, y1, y2, where=y2<=y1, facecolor='red')
-ax1.set_title('Now regions with y2>1 are masked')
-
-# This example illustrates a problem; because of the data
-# gridding, there are undesired unfilled triangles at the crossover
-# points. A brute-force solution would be to interpolate all
-# arrays to a very fine grid before plotting.
-
-# show how to use transforms to create axes spans where a certain condition is satisfied
-fig = figure()
-ax = fig.add_subplot(111)
-y = np.sin(4*np.pi*x)
-ax.plot(x, y, color='black')
-
-# use the data coordinates for the x-axis and the axes coordinates for the y-axis
-import matplotlib.transforms as mtransforms
-trans = mtransforms.blended_transform_factory(ax.transData, ax.transAxes)
-theta = 0.9
-ax.axhline(theta, color='green', lw=2, alpha=0.5)
-ax.axhline(-theta, color='red', lw=2, alpha=0.5)
-ax.fill_between(x, 0, 1, where=y>theta, facecolor='green', alpha=0.5, transform=trans)
-ax.fill_between(x, 0, 1, where=y<-theta, facecolor='red', alpha=0.5, transform=trans)
-
-
-
-show()
-
Copied: trunk/matplotlib/examples/pylab_examples/fill_between_demo.py (from rev 7180, trunk/matplotlib/examples/pylab_examples/fill_between.py)
===================================================================
--- trunk/matplotlib/examples/pylab_examples/fill_between_demo.py	 (rev 0)
+++ trunk/matplotlib/examples/pylab_examples/fill_between_demo.py	2009年06月05日 16:53:11 UTC (rev 7181)
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+import matplotlib.mlab as mlab
+from matplotlib.pyplot import figure, show
+import numpy as np
+
+x = np.arange(0.0, 2, 0.01)
+y1 = np.sin(2*np.pi*x)
+y2 = 1.2*np.sin(4*np.pi*x)
+
+fig = figure()
+ax1 = fig.add_subplot(311)
+ax2 = fig.add_subplot(312, sharex=ax1)
+ax3 = fig.add_subplot(313, sharex=ax1)
+
+ax1.fill_between(x, 0, y1)
+ax1.set_ylabel('between y1 and 0')
+
+ax2.fill_between(x, y1, 1)
+ax2.set_ylabel('between y1 and 1')
+
+ax3.fill_between(x, y1, y2)
+ax3.set_ylabel('between y1 and y2')
+ax3.set_xlabel('x')
+
+# now fill between y1 and y2 where a logical condition is met. Note
+# this is different than calling
+# fill_between(x[where], y1[where],y2[where]
+# because of edge effects over multiple contiguous regions.
+fig = figure()
+ax = fig.add_subplot(211)
+ax.plot(x, y1, x, y2, color='black')
+ax.fill_between(x, y1, y2, where=y2>=y1, facecolor='green')
+ax.fill_between(x, y1, y2, where=y2<=y1, facecolor='red')
+ax.set_title('fill between where')
+
+# Test support for masked arrays.
+y2 = np.ma.masked_greater(y2, 1.0)
+ax1 = fig.add_subplot(212, sharex=ax)
+ax1.plot(x, y1, x, y2, color='black')
+ax1.fill_between(x, y1, y2, where=y2>=y1, facecolor='green')
+ax1.fill_between(x, y1, y2, where=y2<=y1, facecolor='red')
+ax1.set_title('Now regions with y2>1 are masked')
+
+# This example illustrates a problem; because of the data
+# gridding, there are undesired unfilled triangles at the crossover
+# points. A brute-force solution would be to interpolate all
+# arrays to a very fine grid before plotting.
+
+# show how to use transforms to create axes spans where a certain condition is satisfied
+fig = figure()
+ax = fig.add_subplot(111)
+y = np.sin(4*np.pi*x)
+ax.plot(x, y, color='black')
+
+# use the data coordinates for the x-axis and the axes coordinates for the y-axis
+import matplotlib.transforms as mtransforms
+trans = mtransforms.blended_transform_factory(ax.transData, ax.transAxes)
+theta = 0.9
+ax.axhline(theta, color='green', lw=2, alpha=0.5)
+ax.axhline(-theta, color='red', lw=2, alpha=0.5)
+ax.fill_between(x, 0, 1, where=y>theta, facecolor='green', alpha=0.5, transform=trans)
+ax.fill_between(x, 0, 1, where=y<-theta, facecolor='red', alpha=0.5, transform=trans)
+
+
+
+show()
+
Deleted: trunk/matplotlib/examples/pylab_examples/fill_betweenx.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/fill_betweenx.py	2009年06月05日 16:51:21 UTC (rev 7180)
+++ trunk/matplotlib/examples/pylab_examples/fill_betweenx.py	2009年06月05日 16:53:11 UTC (rev 7181)
@@ -1,50 +0,0 @@
-import matplotlib.mlab as mlab
-from matplotlib.pyplot import figure, show
-import numpy as np
-
-## Copy of fill_between.py but using fill_betweenx() instead.
-
-x = np.arange(0.0, 2, 0.01)
-y1 = np.sin(2*np.pi*x)
-y2 = 1.2*np.sin(4*np.pi*x)
-
-fig = figure()
-ax1 = fig.add_subplot(311)
-ax2 = fig.add_subplot(312, sharex=ax1)
-ax3 = fig.add_subplot(313, sharex=ax1)
-
-ax1.fill_betweenx(x, 0, y1)
-ax1.set_ylabel('between y1 and 0')
-
-ax2.fill_betweenx(x, y1, 1)
-ax2.set_ylabel('between y1 and 1')
-
-ax3.fill_betweenx(x, y1, y2)
-ax3.set_ylabel('between y1 and y2')
-ax3.set_xlabel('x')
-
-# now fill between y1 and y2 where a logical condition is met. Note
-# this is different than calling
-# fill_between(x[where], y1[where],y2[where]
-# because of edge effects over multiple contiguous regions.
-fig = figure()
-ax = fig.add_subplot(211)
-ax.plot(y1, x, y2, x, color='black')
-ax.fill_betweenx(x, y1, y2, where=y2>=y1, facecolor='green')
-ax.fill_betweenx(x, y1, y2, where=y2<=y1, facecolor='red')
-ax.set_title('fill between where')
-
-# Test support for masked arrays.
-y2 = np.ma.masked_greater(y2, 1.0)
-ax1 = fig.add_subplot(212, sharex=ax)
-ax1.plot(y1, x, y2, x, color='black')
-ax1.fill_betweenx(x, y1, y2, where=y2>=y1, facecolor='green')
-ax1.fill_betweenx(x, y1, y2, where=y2<=y1, facecolor='red')
-ax1.set_title('Now regions with y2 > 1 are masked')
-
-# This example illustrates a problem; because of the data
-# gridding, there are undesired unfilled triangles at the crossover
-# points. A brute-force solution would be to interpolate all
-# arrays to a very fine grid before plotting.
-
-show()
Copied: trunk/matplotlib/examples/pylab_examples/fill_betweenx_demo.py (from rev 7178, trunk/matplotlib/examples/pylab_examples/fill_betweenx.py)
===================================================================
--- trunk/matplotlib/examples/pylab_examples/fill_betweenx_demo.py	 (rev 0)
+++ trunk/matplotlib/examples/pylab_examples/fill_betweenx_demo.py	2009年06月05日 16:53:11 UTC (rev 7181)
@@ -0,0 +1,50 @@
+import matplotlib.mlab as mlab
+from matplotlib.pyplot import figure, show
+import numpy as np
+
+## Copy of fill_between.py but using fill_betweenx() instead.
+
+x = np.arange(0.0, 2, 0.01)
+y1 = np.sin(2*np.pi*x)
+y2 = 1.2*np.sin(4*np.pi*x)
+
+fig = figure()
+ax1 = fig.add_subplot(311)
+ax2 = fig.add_subplot(312, sharex=ax1)
+ax3 = fig.add_subplot(313, sharex=ax1)
+
+ax1.fill_betweenx(x, 0, y1)
+ax1.set_ylabel('between y1 and 0')
+
+ax2.fill_betweenx(x, y1, 1)
+ax2.set_ylabel('between y1 and 1')
+
+ax3.fill_betweenx(x, y1, y2)
+ax3.set_ylabel('between y1 and y2')
+ax3.set_xlabel('x')
+
+# now fill between y1 and y2 where a logical condition is met. Note
+# this is different than calling
+# fill_between(x[where], y1[where],y2[where]
+# because of edge effects over multiple contiguous regions.
+fig = figure()
+ax = fig.add_subplot(211)
+ax.plot(y1, x, y2, x, color='black')
+ax.fill_betweenx(x, y1, y2, where=y2>=y1, facecolor='green')
+ax.fill_betweenx(x, y1, y2, where=y2<=y1, facecolor='red')
+ax.set_title('fill between where')
+
+# Test support for masked arrays.
+y2 = np.ma.masked_greater(y2, 1.0)
+ax1 = fig.add_subplot(212, sharex=ax)
+ax1.plot(y1, x, y2, x, color='black')
+ax1.fill_betweenx(x, y1, y2, where=y2>=y1, facecolor='green')
+ax1.fill_betweenx(x, y1, y2, where=y2<=y1, facecolor='red')
+ax1.set_title('Now regions with y2 > 1 are masked')
+
+# This example illustrates a problem; because of the data
+# gridding, there are undesired unfilled triangles at the crossover
+# points. A brute-force solution would be to interpolate all
+# arrays to a very fine grid before plotting.
+
+show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7180
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7180&view=rev
Author: jdh2358
Date: 2009年06月05日 16:51:21 +0000 (2009年6月05日)
Log Message:
-----------
added example to fill_between to show how to create multiple axes spans where a condition is true
Modified Paths:
--------------
 trunk/matplotlib/examples/pylab_examples/fill_between.py
Modified: trunk/matplotlib/examples/pylab_examples/fill_between.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/fill_between.py	2009年06月05日 16:49:29 UTC (rev 7179)
+++ trunk/matplotlib/examples/pylab_examples/fill_between.py	2009年06月05日 16:51:21 UTC (rev 7180)
@@ -55,10 +55,11 @@
 # use the data coordinates for the x-axis and the axes coordinates for the y-axis
 import matplotlib.transforms as mtransforms
 trans = mtransforms.blended_transform_factory(ax.transData, ax.transAxes)
-ax.axhline(0.5, color='green', lw=2, alpha=0.5)
-ax.axhline(-0.5, color='red', lw=2, alpha=0.5)
-ax.fill_between(x, 0, 1, where=y2>0.5, facecolor='green', alpha=0.5, transform=trans)
-ax.fill_between(x, 0, 1, where=y2<-0.5, facecolor='red', alpha=0.5, transform=trans)
+theta = 0.9
+ax.axhline(theta, color='green', lw=2, alpha=0.5)
+ax.axhline(-theta, color='red', lw=2, alpha=0.5)
+ax.fill_between(x, 0, 1, where=y>theta, facecolor='green', alpha=0.5, transform=trans)
+ax.fill_between(x, 0, 1, where=y<-theta, facecolor='red', alpha=0.5, transform=trans)
 
 
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7179
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7179&view=rev
Author: jdh2358
Date: 2009年06月05日 16:49:29 +0000 (2009年6月05日)
Log Message:
-----------
added example to fill_between to show how to create multiple axes spans where a condition is true
Modified Paths:
--------------
 trunk/matplotlib/examples/pylab_examples/fill_between.py
Modified: trunk/matplotlib/examples/pylab_examples/fill_between.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/fill_between.py	2009年06月05日 13:00:47 UTC (rev 7178)
+++ trunk/matplotlib/examples/pylab_examples/fill_between.py	2009年06月05日 16:49:29 UTC (rev 7179)
@@ -46,5 +46,21 @@
 # points. A brute-force solution would be to interpolate all
 # arrays to a very fine grid before plotting.
 
+# show how to use transforms to create axes spans where a certain condition is satisfied
+fig = figure()
+ax = fig.add_subplot(111)
+y = np.sin(4*np.pi*x)
+ax.plot(x, y, color='black')
+
+# use the data coordinates for the x-axis and the axes coordinates for the y-axis
+import matplotlib.transforms as mtransforms
+trans = mtransforms.blended_transform_factory(ax.transData, ax.transAxes)
+ax.axhline(0.5, color='green', lw=2, alpha=0.5)
+ax.axhline(-0.5, color='red', lw=2, alpha=0.5)
+ax.fill_between(x, 0, 1, where=y2>0.5, facecolor='green', alpha=0.5, transform=trans)
+ax.fill_between(x, 0, 1, where=y2<-0.5, facecolor='red', alpha=0.5, transform=trans)
+
+
+
 show()
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7178
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7178&view=rev
Author: jdh2358
Date: 2009年06月05日 13:00:47 +0000 (2009年6月05日)
Log Message:
-----------
added JJ's F/C two scale example
Added Paths:
-----------
 trunk/matplotlib/examples/api/fahrenheit_celcius_scales.py
Added: trunk/matplotlib/examples/api/fahrenheit_celcius_scales.py
===================================================================
--- trunk/matplotlib/examples/api/fahrenheit_celcius_scales.py	 (rev 0)
+++ trunk/matplotlib/examples/api/fahrenheit_celcius_scales.py	2009年06月05日 13:00:47 UTC (rev 7178)
@@ -0,0 +1,28 @@
+"""
+Shoiw how to display two scales on the left and right y axis -- Fahrenheit and Celcius
+"""
+
+import matplotlib.pyplot as plt
+
+fig = plt.figure()
+ax1 = fig.add_subplot(111) # the Fahrenheit scale
+ax2 = ax1.twinx() # the Celcius scale
+
+def Tc(Tf):
+ return (5./9.)*(Tf-32)
+
+
+def update_ax2(ax1):
+ y1, y2 = ax1.get_ylim()
+ ax2.set_ylim(Tc(y1), Tc(y2))
+ ax2.figure.canvas.draw()
+
+# automatically update ylim of ax2 when ylim of ax1 changes.
+ax1.callbacks.connect("ylim_changed", update_ax2)
+ax1.plot([78, 79, 79, 77])
+
+ax1.set_title('Two scales: Fahrenheit and Celcius')
+ax1.set_ylabel('Fahrenheit')
+ax2.set_ylabel('Celcius')
+
+plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing 6 results of 6

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