A Simple Plot in Matplotlib

suggest change

This example illustrates how to create a simple sine curve using Matplotlib

# Plotting tutorials in Python
# Launching a simple plot

import numpy as np
import matplotlib.pyplot as plt

# angle varying between 0 and 2*pi
x = np.linspace(0, 2.0*np.pi, 101)
y = np.sin(x)                        # sine function

plt.plot(x, y)
plt.show()

A sample sine curve

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents