Patches I add to my graph are not opaque with alpha=1. Why?

前端 未结 2 1800
慢半拍i
慢半拍i 2021-01-18 03:55

I would like to add a rectangle over a graph. Through all the documentation I\'ve found, the rectangle should be opaque by default, with transparency controlled by an alpha

2条回答
  •  灰色年华
    2021-01-18 04:45

    Your choice of facecolor (CornflowerBlue) has an appearance of being semi-opaque, but in reality the color you are seeing is correct for alpha = 1. Try a different color like 'blue' instead. Matplotlib does appear to be placing the rectangular patch below the line, but I don't think that's a transparency issue.

提交回复
热议问题