Altair 在 LayerChart 中删除边框
Altair remove border in LayerChart
我正在尝试从 altair 图表中删除边框。
工作完美,但当我尝试可视化分层图表时它失败了。
在我的设置中,我有两张图表,一张用于轮廓 m1
,另一张带有分配给每个类别的坐标并正确着色 m2
。
我可以将设置 configure_view(strokeWidth=0)
添加到每个,我可以独立绘制它们,但是在尝试绘制 m1+m2
时出现错误。
Objects with "config" attribute cannot be used within LayerChart. Consider defining the config attribute in the LayerChart object instead.
然后我在没有 config_view
属性的情况下定义了 m1
和 m2
,但现在我不知道如何为最终对象定义它。
显然这就像创建一个新对象并在该对象上设置属性一样简单。
layeredmap=m1+m2
layeredmap.configure_view(StrokeWidth=0)
或者,在绘图时使用括号和定义属性就足够了:
(m1+m2).configure_view(StrokeWidth=0)
我正在尝试从 altair 图表中删除边框。
在我的设置中,我有两张图表,一张用于轮廓 m1
,另一张带有分配给每个类别的坐标并正确着色 m2
。
我可以将设置 configure_view(strokeWidth=0)
添加到每个,我可以独立绘制它们,但是在尝试绘制 m1+m2
时出现错误。
Objects with "config" attribute cannot be used within LayerChart. Consider defining the config attribute in the LayerChart object instead.
然后我在没有 config_view
属性的情况下定义了 m1
和 m2
,但现在我不知道如何为最终对象定义它。
显然这就像创建一个新对象并在该对象上设置属性一样简单。
layeredmap=m1+m2
layeredmap.configure_view(StrokeWidth=0)
或者,在绘图时使用括号和定义属性就足够了:
(m1+m2).configure_view(StrokeWidth=0)