Permalink
Browse files

Added "new_figure_manager_given_figure" function for pgf backend.

  • Loading branch information...
1 parent 7885d94 commit f4245bb6b593704e1613d8d5aeabc618c8e901cf @pelson committed Aug 30, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/matplotlib/backends/backend_pgf.py
@@ -598,6 +598,7 @@ class GraphicsContextPgf(GraphicsContextBase):
def draw_if_interactive():
pass
+
def new_figure_manager(num, *args, **kwargs):
"""
Create a new figure manager instance
@@ -608,7 +609,14 @@ def new_figure_manager(num, *args, **kwargs):
# main-level app (egg backend_gtk, backend_gtkagg) for pylab
FigureClass = kwargs.pop('FigureClass', Figure)
thisFig = FigureClass(*args, **kwargs)
- canvas = FigureCanvasPgf(thisFig)
+ return new_figure_manager_given_figure(thisFig)
+
+
+def new_figure_manager_given_figure(num, figure):
+ """
+ Create a new figure manager instance for the given figure.
+ """
+ canvas = FigureCanvasPgf(figure)
manager = FigureManagerPgf(canvas, num)
return manager

0 comments on commit f4245bb

Please sign in to comment.