简体   繁体   English

Altair 更改边框颜色 LayerChart

[英]Altair change border color LayerChart

Related to this question .这个问题有关

I was able to "hide" the border by setting .configure_view(strokedWidth=0) .我能够通过设置.configure_view(strokedWidth=0)来“隐藏”边框。 Unfortunately, converting the .svg file to .emf makes the border appear again as a very thin line (possible reasons in comments 4 and 6 here .不幸的是,将.svg文件转换为.emf会使边框再次显示为非常细的线(此处的注释 4 和 6 中的可能原因。

Is there a way to set the border color (as the background color, so that it will technically be invisible) or eventually to extend the border so that it doesn't touch the map edge and I will simply be able to crop it out?有没有办法设置边框颜色(作为背景颜色,这样它在技术上是不可见的)或最终扩展边框使其不接触地图边缘,我就可以将其裁剪掉?

You might try using strokeOpacity=0 , to make the stroke transparent.您可以尝试使用strokeOpacity=0使笔触透明。 The docstring of configure_view will show you other available arguments that you could try as well. configure_view的文档字符串将显示您也可以尝试的其他可用参数。

Following jakevdp's suggestion I had a look at the configure_view documentation .按照jakevdp 的建议,我查看了configure_view 文档

I solved this by setting the stroke color to white (same as the background color).我通过将笔触颜色设置为白色(与背景颜色相同)解决了这个问题。

map.configure_view(stroke='white')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM