Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a203bf7

Browse files
committed
added recarray utils module
svn path=/trunk/matplotlib/; revision=4168
1 parent 7d52f32 commit a203bf7

8 files changed

Lines changed: 22 additions & 419 deletions

File tree

API_CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Moved mlab.csv2rec -> recutils.csv2rec
2+
13
Added ax kwarg to pyplot.colorbar and Figure.colorbar so that
24
one can specify the axes object from which space for the colorbar
35
is to be taken, if one does not want to make the colorbar axes

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2007-11-08 Moved csv2rec to recutils and added other record array
2+
utilities - JDH
3+
14
2007-11-08 If available, use existing pyparsing installation - DSD
25

36
2007-11-07 Removed old enthought.traits from lib/matplotlib, added

examples/date_index_formatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"""
1010

1111
import numpy
12-
from matplotlib.mlab import csv2rec
12+
from matplotlib.recutils import csv2rec
1313
from pylab import figure, show
1414
from matplotlib.ticker import Formatter
1515

examples/loadrec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from matplotlib.mlab import csv2rec
1+
from matplotlib.recutils import csv2rec
22
from pylab import figure, show
33

44
a = csv2rec('data/msft.csv')

examples/mathtext_examples.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
r'$\widehat{abc}\widetilde{def}$',
5050
r'$\Gamma \Delta \Theta \Lambda \Xi \Pi \Sigma \Upsilon \Phi \Psi \Omega$',
5151
r'$\alpha \beta \gamma \delta \epsilon \zeta \eta \theta \iota \lambda \mu \nu \xi \pi \kappa \rho \sigma \tau \upsilon \phi \chi \psi$',
52-
ur'Generic symbol: $\u23ce \mathrm{\ue0f2 \U0001D538}$'
52+
#ur'Generic symbol: $\u23ce \mathrm{\ue0f2 \U0001D538}$'
5353
]
5454

5555
from pylab import *
@@ -63,12 +63,13 @@ def doall():
6363
axis([0, 3, -len(tests), 0])
6464
yticks(arange(len(tests)) * -1)
6565
for i, s in enumerate(tests):
66-
print "%02d: %s" % (i, s)
66+
print (i, s)
6767
text(0.1, -i, s, fontsize=20)
6868

69-
savefig('mathtext_example')
70-
close('all')
71-
69+
#savefig('mathtext_example')
70+
#close('all')
71+
show()
72+
7273
if '--latex' in sys.argv:
7374
fd = open("mathtext_examples.ltx", "w")
7475
fd.write("\\documentclass{article}\n")

lib/matplotlib/axes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4068,6 +4068,8 @@ def scatter(self, x, y, s=20, c='b', marker='o', cmap=None, norm=None,
40684068

40694069
Optional kwargs control the PatchCollection properties:
40704070
%(PatchCollection)s
4071+
4072+
A Collection instance is returned
40714073
"""
40724074

40734075
if not self._hold: self.cla()

lib/matplotlib/cbook.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ def safezip(*args):
853853
raise ValueError(_safezip_msg % (Nx, i+1, len(arg)))
854854
return zip(*args)
855855

856+
856857
class MemoryMonitor:
857858
def __init__(self, nmax=20000):
858859
self._nmax = nmax
@@ -895,12 +896,14 @@ def xy(self, i0=0, isub=1):
895896
x = npy.arange(i0, self._n, isub)
896897
return x, self._mem[i0:self._n:isub]
897898

898-
def plot(self, i0=0, isub=1):
899-
from pylab import figure, show
900-
fig = figure()
899+
def plot(self, i0=0, isub=1, fig=None):
900+
if fig is None:
901+
from pylab import figure, show
902+
fig = figure()
903+
901904
ax = fig.add_subplot(111)
902905
ax.plot(*self.xy(i0, isub))
903-
show()
906+
fig.canvas.draw()
904907

905908

906909
def print_cycles(objects, outstream=sys.stdout, show_progress=False):

0 commit comments

Comments
 (0)