簡體   English   中英

每個點的標記邊緣顏色或matplotlib.axes.Axes.errorbar(Python包)的其他標記

[英]Marker edge colors or just other markers of matplotlib.axes.Axes.errorbar (Python Package) to every point

有沒有辦法在每個點上使用matplotlib.axes.Axes.errorbar(Python包)的顏色標記,或者僅使用其他標記?

例:

err = np.array([0.0, math.log(0.0423746910453,10), math.log(0.26659516937,10)])

plt.errorbar(x,y,yerr=err,marker='^',markeredgecolor='gray')

我想對每個點(錯誤)使用一個顏色標記或其他標記。

  • 點1:0.0-> markeredgecolor ='red'或marker ='^'
  • 點2:math.log(0.0423746910453,10)-> markeredgecolor ='blue'或marker ='X'
  • 第三點:math.log(0.26659516937,10)-> markeredgecolor ='green'或marker ='o'

我不確定是否有matplotlib本身支持此功能,但是您可以解決此限制:

首先,繪制連接點與plt.plot(x, y) 然后,可以通過使用不同的選項為每個點調用plt.errorbar來分別繪制每個標記。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM