在Plotly中,像矩形这样的形状可以有平滑的渐变色吗?
我用纯色填充定义该形状为:
shapes=[dict(
type='rect',
xref='x',
yref='paper',
x0=box_from, x1=box_to,
y0=0, y1=1,
fillcolor='Green',
opacity=0.07,
layer='below',
line=dict(width=0),
)]
但是我希望该框不仅具有实心颜色填充,还要具备平滑的颜色渐变效果。
- 这是我正在遵循的文档示例:
https://plotly.com/python/shapes/#highlighting-time-series-regions-with-rectangle-shapes - 关于
fillcolor
的文档并不是很详细:
https://plotly.com/python/reference/#layout-shapes-items-shape-fillcolor - 我猜
colorscales
不适用于形状:
https://plotly.com/python/builtin-colorscales/
我猜答案很简单,就是“不支持”,但也许有人知道得更好。