tôi tìm thấy mã này trên http://matplotlib.sourceforge.net/examples/pylab_examples/quiver_demo.htmllĩnh vực vector Vẽ trong python (matplotlib)
from pylab import *
from numpy import ma
X,Y = meshgrid(arange(0,2*pi,.2),arange(0,2*pi,.2))
U = cos(X)
V = sin(Y)
#1
figure()
Q = quiver(U, V)
qk = quiverkey(Q, 0.5, 0.92, 2, r'$2 \frac{m}{s}$', labelpos='W',
fontproperties={'weight': 'bold'})
l,r,b,t = axis()
dx, dy = r-l, t-b
axis([l-0.05*dx, r+0.05*dx, b-0.05*dy, t+0.05*dy])
title('Minimal arguments, no kwargs')
Bây giờ, làm thế nào tôi có thể thấy đồ họa này? Tốt hơn, làm thế nào tôi có thể lưu nó vào một tập tin như, chúng ta hãy nói, JPEG? Mã này dường như chạy nhưng tôi không thể thấy bất cứ điều gì xảy ra.