Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added "new_figure_manager_given_figure" function for pgf backend.

  • Loading branch information...
commit f4245bb6b593704e1613d8d5aeabc618c8e901cf 1 parent 7885d94
@pelson pelson authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/matplotlib/backends/backend_pgf.py
View
10 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
Please sign in to comment.
Something went wrong with that request. Please try again.