[Yt-svn] yt: Adding show_in_webbrowser() command to RavenPlot, which is u...
hg at spacepope.org
hg at spacepope.org
Mon Aug 30 22:44:14 PDT 2010
hg Repository: yt
details: yt/rev/8ef67bebbef5
changeset: 3360:8ef67bebbef5
user: Matthew Turk <matthewturk at gmail.com>
date:
Mon Aug 30 22:44:08 2010 -0700
description:
Adding show_in_webbrowser() command to RavenPlot, which is usable if
mplh5canvas is installed.
diffstat:
yt/visualization/plot_types.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (15 lines):
diff -r 68a3f7a4c6f1 -r 8ef67bebbef5 yt/visualization/plot_types.py
--- a/yt/visualization/plot_types.py Mon Aug 30 16:43:30 2010 -0700
+++ b/yt/visualization/plot_types.py Mon Aug 30 22:44:08 2010 -0700
@@ -123,6 +123,11 @@
self["GeneratedAt"] = self.data.pf.unique_identifier
return fn
+ def open_in_webbrowser(self):
+ from mplh5canvas.backend_h5canvas import FigureCanvasH5Canvas
+ canv = FigureCanvasH5Canvas(self._figure)
+ canv.draw()
+
def save_to_pdf(self, f):
self._redraw_image()
canvas = FigureCanvasPdf(self._figure)
More information about the yt-svn
mailing list