In any case, place square seaborn boxes at desired distances along the x axis?
I have a dataframe with a Hierarchical index column with indexes Purpose, Max., Type the index of the row of student names
+------------+----------+---------+----------+---------------+ | Type | Homework | Quiz | Homework | Presentations | | | max 100 | max 100 | max 100 | max 100 | +------------+----------+---------+----------+---------------+ | Assignment | 1 | 2 | 3 | 4 | +------------+----------+---------+----------+---------------+ | Student 1 | 88 | 98 | 100 | 85 | +------------+----------+---------+----------+---------------+ | Student 2 | 96 | 79 | 100 | 97 | +------------+----------+---------+----------+---------------+ | Student 3 | 87 | 79 | 72 | 78 | +------------+----------+---------+----------+---------------+ | Student 4 | 87 | 84 | 90 | 85 | +------------+----------+---------+----------+---------------+ | Student 5 | 73 | 91 | 76 | 90 | +------------+----------+---------+----------+---------------+ | Student 6 | 70 | 75 | 98 | 82 | +------------+----------+---------+----------+---------------+ | Student 7 | 85 | 71 | 73 | 75 | +------------+----------+---------+----------+---------------+ | Student 8 | 76 | 81 | 94 | 86 | +------------+----------+---------+----------+---------------+ | Student 9 | 97 | 80 | 95 | 88 | +------------+----------+---------+----------+---------------+
Assignments are actually strings and more descriptive.
I can easily feed the dataframe to the marine environment and this will give a nice sns.boxplot (DF) plot
I would really like the boxes to be divided into different subheadings (not difficult), but that they be arranged in chronological order.
More clearly:
Currently, sns.boxplot(df) puts all timing charts in chronological order, which is nice. For example, I would like to add a subtitle above it, which had only quiz graphs, but the quiz window graphs are lined up horizontally along the x axis, where they will fall if all destinations are turned on.
In any case, place the sea crates at the required distances along the x axis ?
sns.boxplot(df['Quiz'], x=[1,5,9,12]) DOES NOT work, since you cannot override x values ββ(but these are just labels).
source share