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

Skip to content

Commit f282ff8

Browse files
committed
Merged revisions 3962-3983 via svnmerge from
http://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib ........ r3963 | mdboom | 2007-10-18 13:40:30 -0400 (Thu, 18 Oct 2007) | 1 line Major speedup in PDF backend by using hasattr() rather than 'in dir()' ........ r3964 | mdboom | 2007-10-18 14:07:06 -0400 (Thu, 18 Oct 2007) | 1 line Faster version of fill() for PDF writing ........ r3966 | jdh2358 | 2007-10-19 10:23:48 -0400 (Fri, 19 Oct 2007) | 2 lines fixed a verbose report bug in patches ........ r3967 | dsdale | 2007-10-19 10:43:21 -0400 (Fri, 19 Oct 2007) | 2 lines removed a gsave/grestore pair surrounding _draw_ps ........ r3968 | dsdale | 2007-10-19 11:37:41 -0400 (Fri, 19 Oct 2007) | 3 lines changed dependency check for ghostscript, which was failing to identify svn versions ........ r3969 | dsdale | 2007-10-19 11:41:25 -0400 (Fri, 19 Oct 2007) | 2 lines whitespace cleanup ........ r3975 | jdh2358 | 2007-10-21 12:02:07 -0400 (Sun, 21 Oct 2007) | 1 line added a show method for gtk fig manager ........ svn path=/branches/transforms/; revision=3984
1 parent f3a8cb9 commit f282ff8

8 files changed

Lines changed: 27 additions & 18 deletions

File tree

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2007-10-19 Removed a gsave/grestore pair surrounding _draw_ps, which
2+
was causing a loss graphics state info (see "EPS output
3+
problem - scatter & edgecolors" on mpl-dev, 2007-10-29)
4+
- DSD
5+
16
2007-10-15 Fixed a bug in patches.Ellipse that was broken for
27
aspect='auto'. Scale free ellipses now work properly for
38
equal and auto on Agg and PS, and they fall back on a

lib/matplotlib/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,10 @@ class Verbose:
149149
# --verbose-silent or --verbose-helpful
150150
_commandLineVerbose = None
151151

152-
153152
for arg in sys.argv[1:]:
154153
if not arg.startswith('--verbose-'): continue
155154
_commandLineVerbose = arg[10:]
156155

157-
158-
159156
def __init__(self):
160157
self.set_level('silent')
161158
self.fileo = sys.stdout
@@ -195,8 +192,6 @@ def report(self, s, level='helpful'):
195192
return True
196193
return False
197194

198-
199-
200195
def wrap(self, fmt, func, level='helpful', always=True):
201196
"""
202197
return a callable function that wraps func and reports it
@@ -225,6 +220,7 @@ def ge(self, level):
225220

226221
verbose=Verbose()
227222

223+
228224
def checkdep_dvipng():
229225
try:
230226
stdin, stdout = os.popen4('dvipng -version')
@@ -243,7 +239,7 @@ def checkdep_ghostscript():
243239
command = 'gs -v'
244240
stdin, stdout = os.popen4(command)
245241
line = stdout.readlines()[0]
246-
v = line.split()[2]
242+
v = line.split()[-2]
247243
vtest = '.'.join(v.split('.')[:2]) # deal with version numbers like '7.07.1'
248244
float(vtest)
249245
return vtest

lib/matplotlib/backends/backend_gtk.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def __init__(self, canvas, num):
390390

391391
self.window = gtk.Window()
392392
self.window.set_title("Figure %d" % num)
393-
393+
394394
self.vbox = gtk.VBox()
395395
self.window.add(self.vbox)
396396
self.vbox.show()
@@ -439,7 +439,10 @@ def destroy(self, *args):
439439
gtk.main_level() >= 1:
440440
gtk.main_quit()
441441

442-
442+
def show(self):
443+
# show the figure window
444+
self.window.show()
445+
443446
def full_screen_toggle (self):
444447
self._full_screen_flag = not self._full_screen_flag
445448
if self._full_screen_flag:

lib/matplotlib/backends/backend_ps.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,6 @@ def _draw_ps(self, ps, gc, rgbFace, fill=True, stroke=True, command=None):
777777
"""
778778
# local variable eliminates all repeated attribute lookups
779779
write = self._pswriter.write
780-
# write('gsave\n')
781780
if debugPS and command:
782781
write("% "+command+"\n")
783782

@@ -818,7 +817,6 @@ def _draw_ps(self, ps, gc, rgbFace, fill=True, stroke=True, command=None):
818817
write("grestore\n")
819818
if cliprect:
820819
write("grestore\n")
821-
#write('grestore\n')
822820

823821

824822
class GraphicsContextPS(GraphicsContextBase):

lib/matplotlib/collections.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ def set_linestyles(self, ls):
288288
raise ValueError()
289289
except ValueError:
290290
raise ValueError('Do not know how to convert %s to dashes'%ls)
291-
292291
self._linestyles = dashes
293292
set_dashes = set_linestyle = set_linestyles
294293

lib/matplotlib/config/checkdep.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import os, re, sys
1+
import os
2+
import re
3+
import sys
4+
import warnings
25
import distutils.version as version
36

47
def dvipng():
@@ -19,7 +22,7 @@ def ghostscript():
1922
command = 'gs -v'
2023
stdin, stdout = os.popen4(command)
2124
line = stdout.readlines()[0]
22-
v = line.split()[2]
25+
v = line.split()[-2]
2326
vtest = '.'.join(v.split('.')[:2]) # deal with version numbers like '7.07.1'
2427
float(vtest)
2528
return vtest
@@ -130,4 +133,4 @@ def usetex(s):
130133
'unless ghostscript-%s or later is '
131134
'installed on your system') % gs_req)
132135

133-
return flag
136+
return flag

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
# it. It makes very nice antialiased output and also supports alpha
2525
# blending
2626
BUILD_AGG = 1
27-
BUILD_GTKAGG = 'auto'
28-
BUILD_GTK = 'auto'
27+
BUILD_GTKAGG = 1
28+
BUILD_GTK = 1
2929

3030
# build TK GUI with Agg renderer ; requires Tkinter Python extension
3131
# and Tk includes
@@ -271,7 +271,7 @@ def add_dateutil():
271271
# packagers: set rc['numerix'] and rc['backend'] here to override the auto
272272
# defaults, eg
273273
#rc['numerix'] = numpy
274-
#rc['backend'] = GTKAgg
274+
#rc['backend'] = 'GTKAgg'
275275
if sys.platform=='win32':
276276
rc = dict(backend='TkAgg', numerix='numpy')
277277
template = file('matplotlibrc.template').read()

setupext.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@
4343

4444
import os
4545

46+
4647
basedir = {
4748
'win32' : ['win32_static',],
48-
'linux2' : ['/usr/local', '/usr',],
49+
'linux2' : ['/usr/local', '/usr'],
4950
'linux' : ['/usr/local', '/usr',],
5051
'cygwin' : ['/usr/local', '/usr',],
5152
'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
@@ -170,6 +171,7 @@ def has_pkgconfig():
170171
if sys.platform == 'win32':
171172
has_pkgconfig.cache = False
172173
else:
174+
#print 'environ', os.environ['PKG_CONFIG_PATH']
173175
status, output = commands.getstatusoutput("pkg-config --help")
174176
has_pkgconfig.cache = (status == 0)
175177
return has_pkgconfig.cache
@@ -192,6 +194,9 @@ def get_pkgconfig(module,
192194

193195
status, output = commands.getstatusoutput(
194196
"%s %s %s" % (pkg_config_exec, flags, packages))
197+
#if packages.startswith('pygtk'):
198+
# print 'status', status, output
199+
# raise SystemExit
195200
if status == 0:
196201
for token in output.split():
197202
attr = _flags.get(token[:2], None)

0 commit comments

Comments
 (0)