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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

질문:

ian
2015년 7월 27일

편집:

ian
2015년 7월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by