Find log(x) using python

Question:

how can I solve this question plot Log(x) where 0<=x<= 3*pi by using python?

t = np.arange(0.01, 20.0, 0.01)
import numpy as np
import matplotlib.pyplot as plt

plt.subplot(222)
plt.semilogx(t, np.sin( 3*np.pi*t))

Asked By: HaAbs

||

Answers:

import numpy as np
import matplotlib.pyplot as plt

# use np.linspace to create x-points
t = np.linspace(0.01, 3*np.pi, 50)
plt.plot(t, np.log(t));
Answered By: nomansland008
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.