如何在黄砖图中设置图形大小?

Shi*_*_90 2 python yellowbrick

所以我最近才开始发现yellowbrick图书馆的力量(谢谢!)但是有没有办法为内联图设置图形大小?

小智 6

感谢您尝试使用 Yellowbrick (scikit-yb.org)!请务必在 Twitter @scikit-yb 上关注我们,并在 GitHib ( https://github.com/DistrictDataLabs/yellowbrick )上为我们加星标。

要解决您的问题(在文档中的常见问题解答中与其他绘图自定义和其他问题一起解决:https : //www.scikit-yb.org/en/latest/faq.html):您可以更改通过在可视化器实例化时以像素为单位传递所需尺寸的绘图(注意以下是 RadViz 的示例,但大小参数适用于 Yellowbrick):

导入可视化工具

from yellowbrick.features import RadViz
Run Code Online (Sandbox Code Playgroud)

使用size参数实例化可视化工具

visualizer = RadViz(
    classes=classes, features=features, size=(1080, 720))
Run Code Online (Sandbox Code Playgroud)

感谢您提出问题,查看我们的文档,完成文档中的教程并继续征服!在 Twitter 上与我们保持联系!谢谢,黄砖团队