Calling Python from within Matlab
Mostrar comentarios más antiguos
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
Respuestas (0)
Categorías
Más información sobre Call Python from MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!