आह! असल में, linestyle='dashed'
काम करता है, यह सिर्फ क्विवर तीर डिफ़ॉल्ट रूप से भर दिया जाता है और इसमें लाइनविड्थ सेट नहीं होता है। वे पथ के बजाय पैच हैं।
आप कुछ इस तरह करते हैं:
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.axis('equal')
ax.quiver((0,0), (0,0), (3,1), (1,0), angles='xy', scale_units='xy', scale=1,
linestyle='dashed', facecolor='none', linewidth=1)
ax.axis([-4, 4, -4, 4])
plt.show()
आप धराशायी हो तीर, लेकिन शायद काफी नहीं है कि तुम क्या मन में था।
आप थोड़ा और करीब पाने के लिए कुछ पैरामीटर में चारों ओर खेल सकते हैं, लेकिन यह अभी भी वास्तव में अच्छा नहीं लगता है:
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.axis('equal')
ax.quiver((0,0), (0,0), (3,1), (1,0), angles='xy', scale_units='xy', scale=1,
linestyle='dashed', facecolor='none', linewidth=2,
width=0.0001, headwidth=300, headlength=500)
ax.axis([-4, 4, -4, 4])
plt.show()
इसलिए, एक और वैकल्पिक हल hatches उपयोग करने के लिए किया जाएगा :
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.axis('equal')
ax.quiver((0,0), (0,0), (3,1), (1,0), angles='xy', scale_units='xy', scale=1,
hatch='ooo', facecolor='none')
ax.axis([-4, 4, -4, 4])
plt.show()
'linestyle = 'dashed' 'काम करना चाहिए, [दस्तावेज़ीकरण के अनुसार] (http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.quiver)। स्पष्ट रूप से यह काम नहीं कर रहा है, हालांकि। यह शायद एक बग है। –
@ जोकिंगटन: :(वर्कअराउंड के लिए कोई सुझाव? – Mehrdad
दुर्भाग्यवश मेरे सिर के ऊपर से नहीं, दुर्भाग्य से ... –