简体   繁体   English

Altair:带圆角的箱线图

[英]Altair: Boxplot with round corners

For a bar chart, I can set round corners in the following way:对于条形图,我可以通过以下方式设置圆角:

alt.Chart(
  ...
).mark_bar(
  cornerRadiusTopLeft=4,
  cornerRadiusTopRight=4
).encode(
...
)

Is it somehow possible to do the same for boxplots (of course for all four corners)?是否有可能对箱线图(当然是所有四个角)做同样的事情?

Thank you!谢谢!

You can specify the box argument using a dict, like below:您可以使用字典指定 box 参数,如下所示:

alt.Chart(source).mark_boxplot(box={'cornerRadius':8}, extent='min-max').encode(
    x='age:O',
    y='people:Q'
)

在此处输入图像描述

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

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