简体   繁体   中英

Overlaying subplot on seaborn factorplot

I'm creating a plot with factorplot and then trying to add a subplot on top of each box. How can I get the x-axis locations of each individual box in the factor plot to put another line on top?

Maybe there's a way to get all the x-axis values of each box plot on the axes?

Here's my basic factor plot:

在此处输入图片说明

I want to add 1 subplot (the circle) in the middle of each box plot. However, I cannot figure out how to get the x-value of each box to properly space the points.

I see a lot of code for positions and offsets in the seaborn source that lays these out. However, I'm wondering if there is a more straight-forward method to get this information or at least approximate it.

按@ mwaskom的评论,你可以使用sns.stripplot()现在也sns.swarmplot()以包括与数据总括图数据点,如盒子或violinplot。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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