Calling Python from within Matlab

I was just playing around with the python py import within MATLAB. Should this work? The problem is with the plt.show() command. Other lines seem fine. No real reason why I would want to do this, just interested.
plt = py.importlib.import_module('matplotlib.pyplot');
plt.plot([1, 2, 3, 4]);
% plt.show(); % CRASHES MATLAB
plt.savefig('test.pdf', pyargs('dpi', 100, 'facecolor', 'b')); % WORKS
Mac OS 10.10.4 Matlab 2015a

Answers (0)

Asked:

ian
on 27 Jul 2015

Edited:

ian
on 27 Jul 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!