XLSXWRITER-与渐变填充线排队
我正在尝试使用XLSXWriter库绘制光谱。
为此,我想用梯度为界线着色。不幸的是,这对我不起作用,该行停留在默认的颜色中。
这是我尝试过的代码:
spectrumplot.add_series({
'categories': '=Spektrum!$B$1:$CD$1',
'values': '=Spektrum!$B$2:$CD$2',
'gradient': {
'colors': ['#B000AE', '#FF00FC', '#0000FF', '#00FFFF', '#00FF00', '#FFFF00', '#FFA200', '#FF0000', '#000000'],
'positions': [0, 5, 17, 26, 37, 50, 56, 76, 100],
'angle': 0.001}
})
使用spectrumplot.set_plotarea()为背景作品着色,但我想为行本身上色。
有人有想法吗?多谢!
I am trying to plot the light spectrum with the XlsxWriter library.
For this I would like to color the line with a gradient. Unfortunately this does not work for me, the line stays in the default color.
This is the code I tried:
spectrumplot.add_series({
'categories': '=Spektrum!$B$1:$CD$1',
'values': '=Spektrum!$B$2:$CD$2',
'gradient': {
'colors': ['#B000AE', '#FF00FC', '#0000FF', '#00FFFF', '#00FF00', '#FFFF00', '#FFA200', '#FF0000', '#000000'],
'positions': [0, 5, 17, 26, 37, 50, 56, 76, 100],
'angle': 0.001}
})
Using spectrumplot.set_plotarea() to color the background works, but I would like to color the line itself.
Does anyone have any ideas? Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前 XlsxWriter 图表中的线条不支持渐变填充,尽管许多其他图表元素支持渐变填充。如果您在 GitHub 上打开功能请求,我可以将其添加到积压工作中。
更新:功能请求:https://github.com/jmcnamara/XlsxWriter/issues/868
Currently gradient fill isn't supported for lines in XlsxWriter charts although it is supported for many other chart elements. If you open a feature request on GitHub I can add it to the backlog.
Update: Feature request: https://github.com/jmcnamara/XlsxWriter/issues/868