2013-10-21 36 views
2

如何更改ConnectionPatch繪製的線的線型?如果通常的線型「:」,「 - 」或「 - 」可以工作,那將是最好的。我使用的ConnectionPatch代碼是:如何使用Matplotlib的ConnectionPatch繪製虛線?

con = ConnectionPatch(color=seas_col[iseas],linewidth=2, 
    xyA=(mean_vals_1[isn,iseas],0), 
    xyB=(mean_vals_2[isn,iseas],3000), 
    coordsA="data", coordsB="data", 
    axesA=axarr[0], axesB=axarr[1]) 

arrowstyle和connectionstyle都不接受上述樣式。

Example Fig, the connection lines should match the above linestyles.

回答

3

答案是不使用速記符號,但長期的形式,例如「dotted」,「dashed」,「solid」,適用於linestyle關鍵字。