Vertical Boxplot warning


When i am working with boxplot, the vertical orientation is not working


sns.boxplot(xx, whis=0.2, fliersize=1,orient =‘vertical’)

/usr/local/lib/python3.6/dist-packages/seaborn/ FutureWarning: Pass the following variable as a keyword arg: x. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation. FutureWarning /usr/local/lib/python3.6/dist-packages/seaborn/ UserWarning: Vertical orientation ignored with only `x` specified. warnings.warn(single_var_warning.format(“Vertical”, “x”))

Hi @swasthimathi,
I guess the syntax has been changed for vertical plots in seaborn.
Please try the following for a vertical plot:

data = np.random.uniform(size=1000)
sns.boxplot(y=data, whis=0.2)

Note that the argument y in the function call is used as an axis for the data.
Please try this once, and let me know if you face any issues.
If there’s any issue with vertical allignment of other plots, please follow the same procedure.

1 Like


Thanks for your prompt reply. It’s working with the new syntax

1 Like