Unintended Notched Boxplot from Matplotlib, Error from Seaborn
<p>Using sklearn, and tried to do a boxplot using matplotlib. </p>

<pre><code>nps = np.array(all_s)
npd = [dd for dd in all_d]
plt.boxplot(nps.T, npd)
plt.show()
</code></pre>

<p><a href="https://i.stack.imgur.com/X6RoK.png" rel="nofollow"><img src="https://i.stack.imgur.com/X6RoK.png" alt="enter image description here"></a></p>

<p>But it comes out notched, and the upper or lower bounds turn out odd. Also, when I try to plot it in Seaborn, I get the following error: <code>Buffer has wrong number of dimensions (expected 1, got 2)</code>
What am I missing here? </p>

<p>Edit: added data</p>

<pre><code>all_d = range(1,11)    

all_s =

    [[0.31111111111111112,
      0.38333333333333336,
      0.2722222222222222,
      0.29999999999999999,
      0.32222222222222224,
      0.32777777777777778,
      0.3888888888888889,
      0.36312849162011174,
      0.37430167597765363,
      0.37430167597765363],
     [0.57222222222222219,
      0.6333333333333333,
      0.6166666666666667,
      0.62777777777777777,
      0.68333333333333335,
      0.62777777777777777,
      0.69444444444444442,
      0.61452513966480449,
      0.6033519553072626,
      0.6033519553072626],
     [0.73333333333333328,
      0.82222222222222219,
      0.68888888888888888,
      0.7055555555555556,
      0.77777777777777779,
      0.73333333333333328,
      0.81666666666666665,
      0.73743016759776536,
      0.72625698324022347,
      0.72067039106145248],
     [0.81666666666666665,
      0.89444444444444449,
      0.87222222222222223,
      0.87777777777777777,
      0.87777777777777777,
      0.78888888888888886,
      0.85555555555555551,
      0.84916201117318435,
      0.84916201117318435,
      0.82681564245810057],
     [0.90555555555555556,
      0.93888888888888888,
      0.87777777777777777,
      0.91666666666666663,
      0.90555555555555556,
      0.87222222222222223,
      0.90555555555555556,
      0.88268156424581001,
      0.87709497206703912,
      0.8994413407821229],
     [0.89444444444444449,
      0.97222222222222221,
      0.83888888888888891,
      0.91666666666666663,
      0.89444444444444449,
      0.84444444444444444,
      0.92777777777777781,
      0.92737430167597767,
      0.8938547486033519,
      0.92178770949720668],
     [0.90555555555555556,
      0.96111111111111114,
      0.93888888888888888,
      0.91666666666666663,
      0.91666666666666663,
      0.90000000000000002,
      0.93333333333333335,
      0.95530726256983245,
      0.8994413407821229,
      0.92737430167597767],
     [0.90555555555555556,
      0.96111111111111114,
      0.92222222222222228,
      0.92222222222222228,
      0.91666666666666663,
      0.93888888888888888,
      0.93333333333333335,
      0.96648044692737434,
      0.92737430167597767,
      0.92737430167597767],
     [0.93333333333333335,
      0.97777777777777775,
      0.94999999999999996,
      0.93888888888888888,
      0.94444444444444442,
      0.97777777777777775,
      0.94999999999999996,
      0.98882681564245811,
      0.95530726256983245,
      0.94413407821229045],
     [0.91666666666666663,
      0.97777777777777775,
      0.94999999999999996,
      0.94444444444444442,
      0.92777777777777781,
      0.98333333333333328,
      0.94999999999999996,
      0.97765363128491622,
      0.96089385474860334,
      0.94413407821229045]]
</code></pre>

<p>I ended up figuring it out! Thanks to BrenBarn for pointing out that the second argument of <code>.boxplot</code> is <code>notch</code>. I did the following: </p>

<pre><code>nps = np.array(all_s)
npd = [dd for dd in all_d]
box=sns.boxplot(data=nps.T) 
box.set_xticklabels(npd)
plt.show()
</code></pre>

<p><a href="https://i.stack.imgur.com/cfnra.png" rel="nofollow"><img src="https://i.stack.imgur.com/cfnra.png" alt="enter image description here"></a></p>

python matplotlib machine-learning scikit-learn seaborn