arokem / python-matlab-bridge

A simple Python => MATLAB(R) interface and a matlab_magic for ipython
BSD 2-Clause "Simplified" License
332 stars 97 forks source link

Pymatbridge starting but exhibiting weird behavior #253

Open amine-aboufirass opened 7 years ago

amine-aboufirass commented 7 years ago

I am trying to load up the pymatbridge package into Spyder IDE using the following Ipython and following recommended usage:

In [1]: from pymatbridge import Matlab
C:\Anaconda\lib\site-packages\IPython\nbformat.py:13: ShimWarning: The `IPython.nbformat` package has been deprecated since IPython 4.0. You should import from nbformat instead.
  "You should import from nbformat instead.", ShimWarning)

In [2] : mlab = Matlab()

In [3] : mlab.start()
Starting MATLAB on ZMQ socket tcp://127.0.0.1:60171
Send 'exit' command to kill the server
....MATLAB started and connected!
Out[3]: <pymatbridge.pymatbridge.Matlab at 0xc557748>

This opens a tiny non maximizable window which carries the matlab logo but does absolutely nothing:

enter image description here

Since, again following usage, the following code:

%%matlab
a = linspace(0.01,6*pi,100);
plot(sin(a))
grid on
hold on
plot(cos(a),'r')

Does not open up a plot as it should. What is going on here and how can I get pymatbridge to work properly?

arokem commented 7 years ago

Does this work for you outside of Spyder (e.g., in an interactive Python session)?

I am not sure, but it might be some interaction with the IDE.