Ben
Ben

Reputation: 57

How to joint Graph-Cordinates in Matplotlib?

enter image description here

I am plotting output with plt.quiver.So it gives me a 2D field of the array. But as I attached in Image, I wanted to joint coordinates at the upper border as well as at lower border and also around an object(looks like a circle at lower of the graph).

I know the x and y coordinates of the upper and lower border, but I am not able to joint it or make it darker black, so I can see very appropriate boundary and object.

Is there any easy function in matplotlib?

plt.quiver(X,Y,U_pretrain,V_pretrain,M_pretrain, cmap=plt.cm.jet, clim=[0.0,1.0])

Upvotes: 1

Views: 116

Answers (1)

jwalton
jwalton

Reputation: 5686

Given that you know the x and y coordinates of the upper and lower border, after your call to plt.quiver it should be enough to call plt.plot

plt.plot(lower_x, lower_y, color='k')
plt.plot(upper_x, upper_y, color='k')

Upvotes: 1

Related Questions