how to plot densely located points as a smooth image?

Viewed 30

I generated many sample points, and they are clustered by the nature of the generation process. If I scatter plot them, I see blurred edges. But they are supposed to be smooth in theory. Increasing sample size and decreasing point size in the scatter plot improves the quality, but never perfect. I am wondering how to plot these points as an image.

x = np.linspace(0,6,500)
y = np.linspace(0,6,500)
X,Y = np.meshgrid(x,y)
s = np.sin(X) + np.cos(Y)
t = np.sin(X) / (np.cos(Y) + 2)
ST = [(s[i,j], t[i,j]) for i in range(s.shape[0]) for j in range(s.shape[1])]
plt.scatter(*zip(*ST))

enter image description here

0 Answers
Related