Changeset 1020
- Timestamp:
- 04/19/06 11:01:25 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asaplotbase.py
r1019 r1020 414 414 try: 415 415 if fname[-3:].lower() == ".ps": 416 from matplotlib import __version__ as mv 416 417 w = self.figure.figwidth.get() 417 418 h = self.figure.figheight.get() 418 a4w = 8.25419 a4h = 11.25420 419 421 420 if orientation is None: … … 425 424 else: 426 425 orientation = 'portrait' 427 ds = None 428 if orientation == 'landscape': 429 ds = min(a4h/w,a4w/h) 430 else: 431 ds = min(a4w/w,a4h/h) 432 ow = ds * w 433 oh = ds * h 434 self.figure.set_figsize_inches((ow,oh)) 426 # hack to circument ps bug in eraly versions of mpl 427 if int(mv.split(".")[1]) < 86: 428 a4w = 8.25 429 a4h = 11.25 430 ds = None 431 if orientation == 'landscape': 432 ds = min(a4h/w,a4w/h) 433 else: 434 ds = min(a4w/w,a4h/h) 435 ow = ds * w 436 oh = ds * h 437 self.figure.set_figsize_inches((ow,oh)) 435 438 self.canvas.print_figure(fname,orientation=orientation) 436 439 print 'Written file %s' % (fname)
Note:
See TracChangeset
for help on using the changeset viewer.