如何在Pygal中更改笔划宽度?

2024-06-01 00:05:43 发布

您现在位置:Python中文网/ 问答频道 /正文

在Pygal中,有没有方法可以更改笔划宽度(例如使其更粗)?在

我在文件里没有找到任何相关的东西。在


Tags: 文件方法宽度笔划pygal
1条回答
网友
1楼 · 发布于 2024-06-01 00:05:43

Style类上有一个to_dict方法,它对创建自定义样式非常有用。在

>>> CleanStyle.to_dict()
{'opacity': '.8', 'foreground': 'rgba(0, 0, 0, 0.9)', 'plot_background': 'rgba(240, 240, 240, 0.7)', 'stroke_style': 'round', 'foreground_light': 'rgba(0, 0, 0, 0.9)', 'transition': '250ms', 'foreground_dark': 'rgba(0, 0, 0, 0.5)', 'stroke_dasharray': '0,0', 'opacity_hover': '.9', 'stroke_width': 1.0, 'colors': ('rgb(12,55,149)', 'rgb(117,38,65)', 'rgb(228,127,0)', 'rgb(159,170,0)', 'rgb(149,12,12)'), 'background': 'transparent', 'font_family': 'monospace'}

下面是如何创建具有粗笔划宽度的自定义样式。在

^{pr2}$

相关问题 更多 >