是否可以(如何)从matplotlib向pdf添加专色? [英] Is it possible (how) to add a spot color to pdf from matplotlib?

查看:90
本文介绍了是否可以(如何)从matplotlib向pdf添加专色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个必须使用(多个)专色的图表。此颜色可能是RGB或CMYK都无法访问的颜色。是否可以在matplotlib中为某行指定专色并将其导出为pdf?直接导出是首选方法,但不是必需的方法。



注意: A

解决方案

最近我在寻找类似的东西,我不知道您是否能够找到它,但是ReportLab的方法是PCMYKColorSep。


因此您可以集成


上面的示例实际上并没有与matplotlib集成在一起,但是它确实添加了斑点。


p>

  c = Canvas('test.pdf',(420,200))
language_spot = PCMYKColorSep(0.0,100.0,91.0,0.0, spotName ='LanguageSpot',密度= 100)
c.setFillColor(language_spot)
c.rect(300,75,100,100,fill = True,stroke = False)
c。 save()


I am creating a chart which has to use (multiple) spot colors. This color could be one that is neither accessible from RGB nor CMYK. Is there a possibility to specify a spot color for a line in matplotlib and export this to pdf? Direct export is preferred but not necessary.

Note: A

解决方案

I was looking for something like this recently, I don't know if you managed to find it, but ReportLab has a method that is PCMYKColorSep.

So you could integrate the graph from matplotlib within a reportlab canvas, and add as many color separations as you see fitting.

The example above doesn't actually integrate with matplotlib, but it does add the spot

c = Canvas('test.pdf', (420, 200))
language_spot = PCMYKColorSep(0.0, 100.0, 91.0, 0.0, spotName='LanguageSpot', density=100)
c.setFillColor(language_spot)
c.rect(300, 75, 100, 100, fill=True, stroke=False)
c.save()

这篇关于是否可以(如何)从matplotlib向pdf添加专色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆