Makes the upper and lower quartiles for a violin plot.
(q1, q3)
| 90 | |
| 91 | |
| 92 | def make_quartiles(q1, q3): |
| 93 | """ |
| 94 | Makes the upper and lower quartiles for a violin plot. |
| 95 | """ |
| 96 | return graph_objs.Scatter( |
| 97 | x=[0, 0], |
| 98 | y=[q1, q3], |
| 99 | text=[ |
| 100 | "lower-quartile: " + "{:0.2f}".format(q1), |
| 101 | "upper-quartile: " + "{:0.2f}".format(q3), |
| 102 | ], |
| 103 | mode="lines", |
| 104 | line=graph_objs.scatter.Line(width=4, color="rgb(0,0,0)"), |
| 105 | hoverinfo="text", |
| 106 | ) |
| 107 | |
| 108 | |
| 109 | def make_median(q2): |