'How to show box plot with two data and legend?

I just stuck on a box plot where I have three types of data, let me explain; I HAVE 5 different model, like = LR, D, NB, SVM, R I want to show this model in legend. And on other data, I have 9 types, example: [a, b, c, d, e, f, g, h, I]

# a = [86.0, 91.7, 92.3, 92.8, 91.1, 92.7, 89.1, 90.0, 85.7, 86.75, 93.5]
# b = [87.6, 90.5, 91.1, 91.1, 91.1, 91.0, 88.2, 88.1, 87.0, 85.3, 91.7]
# c = [87.0, 91.5, 92.5, 92.0, 92.3, 92.3, 90.0, 90.0, 87.0, 87.0, 92.9]
# d= [84.0, 84.9, 91.7, 89.9, 89.4, 88.8, 86.8, 84.8, 84.1, 84.8, 92.3]
# e= [91.0, 87.0, 88.8, 91.0, 95.9, 93.5, 93.5, 90.0, 90.2, 88.8, 97.0]
# f = [86.0, 91.7, 92.3, 92.8, 91.1, 92.7, 89.1, 90.0, 85.7, 86.75, 93.5]
# g = [87.6, 90.5, 91.1, 91.1, 91.1, 91.0, 88.2, 88.1, 87.0, 85.3, 91.7]
# h = [87.0, 91.5, 92.5, 92.0, 92.3, 92.3, 90.0, 90.0, 87.0, 87.0, 92.9]

and others is performance.

I want to show a box plot like that, On models in legend. and others all data in the box plot. and data a,b,c,d, e, f,g,h,I will shot in x axis. performance on the y-axis.

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source