praxmon
praxmon

Reputation: 5121

Pyplot plot function

Given below is the code for plotting points using pyplot.

x1=300+p[k]*math.cos(val[thetaval])
y1=300+p[k]*math.sin(val[thetaval])
plt.plot(x1,y1,'k.')

The plotting is working fine, the problem is, if I want to plot it as a point I am specifying the dot in 'k.' inside the plot function. The output is something like:

enter image description here

The width of the black line/curve that I am plotting is much more that needed. How to reduce it?

Upvotes: 0

Views: 1243

Answers (2)

gabra
gabra

Reputation: 10544

It seems that you are not plotting a line but a series of small points. Maybe if you try setting the markersize argument of the plot function could work.

Upvotes: 2

user3433065
user3433065

Reputation: 73

Looking into the documentation of plot() you can find "linewidth"

So use:

plt.plot(x1,y1,'k.', linewidth=0.1)

Upvotes: 0

Related Questions