我试过了(但失败了!)得到^{
手册中有一个关于^{matplotlib
将使用alpha
来实现这一点,但我在pyx
文档中找不到这样的条目。在
在我的例子中,我试图在一个实心矩形上画一个蓝色的透明圆环。有人知道怎么做吗?在
from pyx import canvas, path, color
from pathlib import Path
HERE = Path(__file__).parent
out_path = HERE / 'pyx_test'
c = canvas.canvas()
c.fill(path.rect(-5, -5, 10, 10), [color.rgb.red])
# color.transparency(value) ...?
c.fill(path.circle(0, 0, 6), [color.rgb.blue])
c.writePDFfile(str(out_path))
print('wrote "{}"'.format(out_path))
颜色透明度应与填充方法一起传递。在
你可以试试这个:
相关问题 更多 >
编程相关推荐