Show More
@@ -91,6 +91,7 b' class OctaveMagics(Magics):' | |||
|
91 | 91 | ''' |
|
92 | 92 | inputs = line.split(' ') |
|
93 | 93 | for input in inputs: |
|
94 | input = unicode_to_str(input) | |
|
94 | 95 | self.oct.put(input, self.shell.user_ns[input]) |
|
95 | 96 | |
|
96 | 97 | |
@@ -123,11 +124,14 b' class OctaveMagics(Magics):' | |||
|
123 | 124 | @magic_arguments() |
|
124 | 125 | @argument( |
|
125 | 126 | '-i', '--input', action='append', |
|
126 |
help='Names of input variables to be pushed to Octave. Multiple names |
|
|
127 | help='Names of input variables to be pushed to Octave. Multiple names ' | |
|
128 | 'can be passed, separated by commas with no whitespace.' | |
|
127 | 129 | ) |
|
128 | 130 | @argument( |
|
129 | 131 | '-o', '--output', action='append', |
|
130 |
help='Names of variables to be pulled from Octave after executing cell |
|
|
132 | help='Names of variables to be pulled from Octave after executing cell ' | |
|
133 | 'body. Multiple names can be passed, separated by commas with no ' | |
|
134 | 'whitespace.' | |
|
131 | 135 | ) |
|
132 | 136 | @argument( |
|
133 | 137 | '-s', '--size', action='append', |
@@ -209,12 +213,13 b' class OctaveMagics(Magics):' | |||
|
209 | 213 | |
|
210 | 214 | function fig_create(src, event) |
|
211 | 215 | global __ipy_figures; |
|
212 |
__ipy_figures( |
|
|
216 | __ipy_figures(gcf()) = src; | |
|
213 | 217 | set(src, "visible", "off"); |
|
214 | 218 | end |
|
215 | 219 | |
|
216 | 220 | set(0, 'DefaultFigureCreateFcn', @fig_create); |
|
217 | 221 | |
|
222 | close all; | |
|
218 | 223 | clear ans; |
|
219 | 224 | ''' |
|
220 | 225 | |
@@ -229,10 +234,10 b' class OctaveMagics(Magics):' | |||
|
229 | 234 | |
|
230 | 235 | for f = __ipy_figures |
|
231 | 236 |
|
|
232 | print(f, outfile, '-dpng', '-S%(size)s'); | |
|
237 | try | |
|
238 | print(f, outfile, '-dpng', '-tight', '-S%(size)s'); | |
|
239 | end | |
|
233 | 240 | end |
|
234 | ||
|
235 | # close all; | |
|
236 | 241 | |
|
237 | 242 | ''' % {'plot_dir': plot_dir, 'size': size} |
|
238 | 243 |
General Comments 0
You need to be logged in to leave comments.
Login now