[英]Hide facet title in Altair chart?
Given a simple, faceted chart like: 给定一个简单的多面图表,例如:
import altair as alt
data = alt.Data(values = [
{ "category" : "a", "x" : 1, "y" : 2 },
{ "category" : "a", "x" : 2, "y" : 4 },
{ "category" : "b", "x" : 1, "y" : 3 },
{ "category" : "b", "x" : 2, "y" : 5 }
])
alt.Chart(data).mark_point().encode(x = "x:Q", y = "y:Q").facet(
row = "category:O"
)
How do you hide the top-level "category" title along the y axis (while keeping the "a" and "b" labels)? 如何沿y轴隐藏顶级“类别”标题(同时保留“ a”和“ b”标签)?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.