Skip to content

Commit

Permalink
Update Sage patches for Sage 5.11
Browse files Browse the repository at this point in the history
  • Loading branch information
ihanson committed Aug 19, 2013
1 parent c52619e commit 0be9c7d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
6 changes: 3 additions & 3 deletions sage-patches/01-sage-embedded.patch
Expand Up @@ -219,9 +219,9 @@ diff --git a/sage/misc/html.py b/sage/misc/html.py
diff --git a/sage/misc/interpreter.py b/sage/misc/interpreter.py
--- a/sage/misc/interpreter.py
+++ b/sage/misc/interpreter.py
@@ -71,19 +71,6 @@
from preparser import (preparse, preparse_file, load_wrap,
modified_attached_files, attached_files)
@@ -70,19 +70,6 @@
List, Unicode, Instance, Type)
from preparser import (preparse, preparse_file, load_wrap)

-def embedded():
- """
Expand Down
14 changes: 10 additions & 4 deletions sage-patches/02-sage-show.patch
Expand Up @@ -261,7 +261,7 @@ diff --git a/sage/plot/graphics.py b/sage/plot/graphics.py
else:
kwds.setdefault('filename', tmp_filename(ext='.png'))
self.save(**kwds)
@@ -2651,42 +2661,47 @@
@@ -2717,45 +2727,50 @@
options.update(kwds)
dpi = options.pop('dpi')
transparent = options.pop('transparent')
Expand Down Expand Up @@ -291,6 +291,9 @@ diff --git a/sage/plot/graphics.py b/sage/plot/graphics.py
+ elif ext in ['', '.sobj']:
+ SageObject.save(self, filename)
+
+ from matplotlib import rcParams
+ rc_backup = (rcParams['ps.useafm'], rcParams['pdf.use14corefonts'],
+ rcParams['text.usetex']) # save the rcParams
+ figure = self.matplotlib(**options)
+ # You can output in PNG, PS, EPS, PDF, or SVG format, depending on the file extension.
+ # matplotlib looks at the file extension to see what the renderer should be.
Expand All @@ -311,6 +314,9 @@ diff --git a/sage/plot/graphics.py b/sage/plot/graphics.py
+ transparent=transparent, format=format)
+
else:
- from matplotlib import rcParams
- rc_backup = (rcParams['ps.useafm'], rcParams['pdf.use14corefonts'],
- rcParams['text.usetex']) # save the rcParams
- figure = self.matplotlib(**options)
- # You can output in PNG, PS, EPS, PDF, or SVG format, depending
- # on the file extension.
Expand All @@ -322,7 +328,7 @@ diff --git a/sage/plot/graphics.py b/sage/plot/graphics.py
- figure.set_canvas(FigureCanvasAgg(figure))
- # this messes up the aspect ratio!
- #figure.canvas.mpl_connect('draw_event', pad_for_tick_labels)
-
-
- # tight_layout adjusts the *subplot* parameters so ticks aren't cut off, etc.
- figure.tight_layout()
-
Expand All @@ -336,8 +342,8 @@ diff --git a/sage/plot/graphics.py b/sage/plot/graphics.py
+ figure.savefig(filename, dpi=dpi,
+ transparent=transparent, format=format)


class GraphicsArray(SageObject):
# Restore the rcParams to the original, possibly user-set values
(rcParams['ps.useafm'], rcParams['pdf.use14corefonts'],
@@ -3046,11 +3061,18 @@
self.save(DOCTEST_MODE_FILE,
dpi=dpi, figsize=self._figsize, axes = axes, **args)
Expand Down

0 comments on commit 0be9c7d

Please sign in to comment.