Submitted by N3XT191 t3_ycb3np in dataisbeautiful
PFhelpmePlan t1_itm9006 wrote
Any chance you could share your code for doing the boxplots with the individual data points included like that?
N3XT191 OP t1_itm9t4u wrote
Sure: https://pastebin.com/raw/kd1WgRza
The data file is just a CSV with pagecount,genre_id
.
I start with creating filtered_pagecounts
which is just a list of genres, each genre being a list of y-values.
Add some random x-offsets (line 36) and then plot 1 scatter plot per genre and the box plot on top.
PFhelpmePlan t1_itmxzxs wrote
Awesome, thank you for the explanation! I really like how the offset points look as well.
N3XT191 OP t1_itmy5xb wrote
Ideally they’d be evenly distributed so the width of the point cloud represents the density (like in a violin plot), but that was too annoying to implement. Maybe next time!
Viewing a single comment thread. View all comments