I have recently updated my seaborn from 0.5.1 to the new 0.6.0 version. I had been using seaborn to make box plots and violinplots in python notebookand now I can't seem to make my code work anymore. Matplotlib plt.boxplot
still works with my data. Particularly, the problem seems to happen when I have a group of lists or arrays in which the subsets are different in size.
e.g.:
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
x = np.array([1,3,4]), ([1,2])
plt.boxplot(x) #this works
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
x = np.array([1,3,4]), ([1,2])
sns.boxplot(x) #doesn't work
This is the error I get when I try the seaborn box plot
ValueError: List of boxplot statistics and `positions` values must have same the length
In the new seaborn tutorial, it says sns.boxplot
should take everything that plt.boxplot
does. Has anyone had the same problem with the update? Is there a way of making this work? If not, is there a way of installing both the 0.6.0 version and the 0.5.1 version and calling a specific version in certain notebooks?