On Mon, Jan 18, 2016 at 8:40 AM, HG <henri.gir...@gmail.com> wrote:
> Hi,
> I can't get no maplotlib graphic inline , is it possible to do it ?
> %display latex
> %matplotlib inline
> import matplotlib.pyplot as plt
> import numpy as np
> x=np.linspace(-5,5,100)
> plt.plot(x,np.sin(x))  # on utilise la fonction sinus de Numpy
> plt.ylabel('fonction sinus')
> plt.xlabel("l'axe des abcisse
> Any help

Your input is cut off above, so it's unclear what you're doing.  I
don't know what "%display latex" does.  Are you using sagenb,
sagemathcloud, or Jupyter/IPython?

In any case, the following works in SageMathCloud worksheets:

import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(-5,5,100)
plt.plot(x,np.sin(x))  # on utilise la fonction sinus de Numpy
plt.ylabel('fonction sinus')
plt.xlabel("l'axe des abcisse")
plt.show()

Public Example:

https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2016-01-18-110923-matplotlib.sagews

And in Jupyter notebooks do this:

%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(-5,5,100)
plt.plot(x,np.sin(x))  # on utilise la fonction sinus de Numpy
plt.ylabel('fonction sinus')
plt.xlabel("l'axe des abcisse")
plt.show()

Public Example:

https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2016-01-18-111223-matplotlib.html

And it would be a pain in the arse in sagenb, which I'm sure you're
not using for this.

William

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to