Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Please help me I couldn't draw the picture i want in the doccument using Sagetex

\begin{sagesilent} import numpy as np from scipy.fftpack import fft,ifft N1 = 16 n1 = np.linspace(0.0,16,N1) y = np.array([np.cos(((2.0 * np.pi*i))/N1) for i in range (0,N1)]) yf = fft(y) import matplotlib import matplotlib.pyplot as plt fig = plt.figure(2) ax = fig.add_subplot(221) plt.plot(n1,y) ay = fig.add_subplot(222) p = plt.plot(n1,yf) g = plt.savefig("test.svg", format="svg") plt.close(fig) \end{sagesilent}

Please help me I couldn't draw the picture i want in the doccument using Sagetex

\begin{sagesilent} import numpy as np from scipy.fftpack import fft,ifft N1 = 16 n1 = np.linspace(0.0,16,N1) y = np.array([np.cos(((2.0 * np.pi*i))/N1) for i in range (0,N1)]) yf = fft(y) import matplotlib import matplotlib.pyplot as plt fig = plt.figure(2) ax = fig.add_subplot(221) plt.plot(n1,y) ay = fig.add_subplot(222) p = plt.plot(n1,yf) g = plt.savefig("test.svg", format="svg") plt.close(fig) \end{sagesilent}

Please help me me!! I couldn't draw the picture i want in the doccument document using Sagetex

\begin{sagesilent} import numpy as np from scipy.fftpack import fft,ifft N1 = 16 n1 = np.linspace(0.0,16,N1) y = np.array([np.cos(((2.0 * np.pi*i))/N1) for i in range (0,N1)]) yf = fft(y) import matplotlib import matplotlib.pyplot as plt fig = plt.figure(2) ax = fig.add_subplot(221) plt.plot(n1,y) ay = fig.add_subplot(222) p = plt.plot(n1,yf) g = plt.savefig("test.svg", format="svg") plt.close(fig) \end{sagesilent}

Please help me!! Displaying a matplotlib picture using SageTeX

I couldn't draw the picture i I want in the a LaTeX document using SagetexSageTeX.

Here is my code.

\begin{sagesilent} import numpy as np from scipy.fftpack import fft,ifft N1 = 16 n1 = np.linspace(0.0,16,N1) y = np.array([np.cos(((2.0 * np.pi*i))/N1) for i in range (0,N1)]) yf = fft(y) import matplotlib import matplotlib.pyplot as plt fig = plt.figure(2) ax = fig.add_subplot(221) plt.plot(n1,y) ay = fig.add_subplot(222) p = plt.plot(n1,yf) g = plt.savefig("test.svg", format="svg") plt.close(fig) \end{sagesilent}