Converting a line plot to a scatter in Python
Question:
I am making a line plot of the array A
. Is there a way to convert it to a scatter plot? I present the current output for reference.
import numpy as np
import matplotlib.pyplot as plt
A=np.array([[0.02109 ],
[0.02109 ],
[0.0201082 ],
[0.02109 ],
[0.02109 ],
[0.02109 ],
[0.02055473],
[0.02055797],
[0.02109 ],
[0.02109 ],
[0.02109 ],
[0.02109 ]])
plt.title("Line graph")
plt.plot(A, color="red")
The current output is
Answers:
I am making a line plot of the array A
. Is there a way to convert it to a scatter plot? I present the current output for reference.
import numpy as np
import matplotlib.pyplot as plt
A=np.array([[0.02109 ],
[0.02109 ],
[0.0201082 ],
[0.02109 ],
[0.02109 ],
[0.02109 ],
[0.02055473],
[0.02055797],
[0.02109 ],
[0.02109 ],
[0.02109 ],
[0.02109 ]])
plt.title("Line graph")
plt.plot(A, color="red")
The current output is