close

How to plot individual points without curve in python?

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How to plot individual points without curve in python in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

Table of Contents

How to plot individual points without curve in python?

  1. How to plot individual points without curve in python?

    You can use scatter:
    import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 2*np.pi, 10) y = np.sin(x) plt.scatter(x, y) plt.show()

  2. plot individual points without curve in python

    You can use scatter:
    import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 2*np.pi, 10) y = np.sin(x) plt.scatter(x, y) plt.show()

Method 1

You can use scatter:

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0, 2*np.pi, 10)
y = np.sin(x)
plt.scatter(x, y)
plt.show()
enter image description here

Alternatively:

plt.plot(x, y, 's')
enter image description here

EDIT: If you want error bars you can do:

plt.errorbar(x, y, yerr=err, fmt='o')
enter image description here

Conclusion

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read