2015-05-17 24 views
0

似乎是一個超級簡單的事情,希望我失去了一些明顯的東西或有matplotlib中的錯誤。如果有幫助,我使用matplotlib 1.4.3。matplotlib行與標記和線寬 - 意想不到的結果

from pylab import * 
t = arange(0.0, 2.0, 0.01) 
s = sin(2 * pi * t) 
plot(t, s, c='m', lw=10) 

enter image description here

一切看起來都不錯。真棒。

from pylab import * 
t = arange(0.0, 2.0, 0.01) 
s = sin(2 * pi * t) 
plot(t, s, c='m', lw=10, marker='o', mfc='m') 

enter image description here

說什麼?我的線現在是藍色的,即使我有c ='m'?

甚至更​​混亂...不設置線寬...

from pylab import * 
t = arange(0.0, 2.0, 0.01) 
s = sin(2 * pi * t) 
plot(t, s, c='m', marker='o', mfc='m') 

enter image description here

同樣,按預期方式工作,沒有問題,線顏色是品紅色C = 'M' 。我在這裏錯過了什麼?爲什麼線條的顏色是藍色的,如果我設置線寬並且有標記?

感謝, 鮑勃

回答

0

好吧,想出了一個解決辦法,呼籲情節兩次。一個與標記,然後再次與線寬。仍然看起來像一個matplotlib的錯誤,但我會等待報告任何東西,希望這裏有人有一個適當的解決方案或答案爲什麼這樣的行爲。

from pylab import * 
t = arange(0.0, 2.0, 0.01) 
s = sin(2 * pi * t) 
plot(t, s, c='m', marker='o') 
plot(t, s, c='m', lw=4) 

enter image description here