Answers for "plot in matplotlib in python"

1

how to plotting points on matplotlib

import matplotlib.pyplot as plt 
import numpy as np

data = np.random.rand(1024,2)
plt.scatter(data[:,0],data[:,1])
plt.show()
// Don't be
// fooled by this simplicity— plt.scatter() is a rich command.
Posted by: Guest on June-13-2020
3

python plot

import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4], [1, 4, 9, 16])
plt.show()
Posted by: Guest on December-09-2020
0

pyplot.plot

plot([x], y, [fmt], *, data=None, **kwargs)
plot([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)
Posted by: Guest on July-21-2020

Python Answers by Framework

Browse Popular Code Answers by Language