Show More
@@ -42,6 +42,7 b' To enable the magics below, execute ``%load_ext octavemagic``.' | |||||
42 | import tempfile |
|
42 | import tempfile | |
43 | from glob import glob |
|
43 | from glob import glob | |
44 | from shutil import rmtree |
|
44 | from shutil import rmtree | |
|
45 | import sys | |||
45 |
|
46 | |||
46 | import numpy as np |
|
47 | import numpy as np | |
47 | import oct2py |
|
48 | import oct2py | |
@@ -78,7 +79,11 b' class OctaveMagics(Magics):' | |||||
78 | """ |
|
79 | """ | |
79 | super(OctaveMagics, self).__init__(shell) |
|
80 | super(OctaveMagics, self).__init__(shell) | |
80 | self._oct = oct2py.Oct2Py() |
|
81 | self._oct = oct2py.Oct2Py() | |
81 |
|
|
82 | if sys.platform == 'win32': | |
|
83 | # Use svg by default due to lack of Ghostscript on Windows Octave | |||
|
84 | self._plot_format = 'svg' | |||
|
85 | else: | |||
|
86 | self._plot_format = 'png' | |||
82 |
|
87 | |||
83 | # Allow publish_display_data to be overridden for |
|
88 | # Allow publish_display_data to be overridden for | |
84 | # testing purposes. |
|
89 | # testing purposes. | |
@@ -273,6 +278,9 b' class OctaveMagics(Magics):' | |||||
273 |
|
278 | |||
274 | if args.format is not None: |
|
279 | if args.format is not None: | |
275 | plot_format = args.format |
|
280 | plot_format = args.format | |
|
281 | elif sys.platform == 'win32': | |||
|
282 | # Use svg by default due to lack of Ghostscript on Windows Octave | |||
|
283 | plot_format = 'svg' | |||
276 | else: |
|
284 | else: | |
277 | plot_format = 'png' |
|
285 | plot_format = 'png' | |
278 |
|
286 |
General Comments 0
You need to be logged in to leave comments.
Login now