enter image description hereI mad a boxplot from a df (pets) with the type of animal and age of each animal. I need the cat box to be purple, dog to be green, and parrot to be orange. I can't figure out how to change the the color of the individual boxes.
I have been on stack all day trying different codes. Not sure in particular what I have tried though. I am relatively new to python.
import matplotlib.pyplot as pl t
import numpy as np
import pandas as pd
pets = pd.read_csv('pets (1).csv')
boxplot = pets.boxplot(column=['Age'], by=['Kind'], patch_artist = True)
I have a boxplot that shows the 3 different animal kinds by age, but they are all filled in blue and need the colors to be different for each one.