<p dir="auto">I want to use the seaborn violin plot due to the extrapolations of the KDE. However, the violin plot of the <strong>last two</strong> ones are very tiny, I need to zoom  in to see the distribution. But this doesn't happen with matplotlib.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
import seaborn as sns

a=[[195.0, 245.0, 142.0, 237.0, 153.0, 238.0, 168.0, 145.0, 229.0, 138.0, 176.0, 116.0, 252.0, 148.0, 199.0, 162.0, 134.0, 163.0, 130.0, 339.0, 152.0, 208.0, 152.0, 192.0, 163.0, 249.0, 113.0, 176.0, 123.0, 189.0, 150.0, 207.0, 184.0, 153.0, 228.0, 153.0, 170.0, 118.0, 302.0, 197.0, 211.0, 159.0, 228.0, 147.0, 166.0, 156.0, 167.0, 147.0, 126.0, 155.0, 138.0, 159.0, 139.0, 111.0, 133.0, 134.0, 131.0, 156.0, 240.0, 207.0, 150.0, 207.0, 265.0, 151.0, 173.0, 157.0, 261.0, 186.0, 195.0, 158.0, 272.0, 134.0, 221.0, 131.0, 252.0, 148.0, 178.0, 206.0, 146.0, 217.0, 159.0, 190.0, 156.0, 172.0, 159.0, 141.0, 167.0, 168.0, 218.0, 191.0, 207.0, 164.0], [689.0, 675.0, 648.0, 671.0, 647.0, 688.0, 776.0, 628.0, 680.0, 642.0, 682.0, 738.0, 659.0, 682.0, 616.0, 652.0, 781.0, 626.0, 629.0, 618.0, 628.0, 675.0, 604.0, 637.0, 601.0, 676.0, 682.0, 794.0, 788.0, 731.0, 635.0, 653.0, 641.0, 626.0, 639.0, 608.0, 654.0, 621.0, 783.0, 627.0, 784.0, 666.0, 721.0, 647.0, 644.0, 708.0, 653.0, 667.0, 656.0, 659.0, 626.0, 647.0, 683.0, 657.0, 720.0, 652.0, 624.0, 655.0, 609.0, 616.0, 655.0, 596.0, 619.0, 646.0, 701.0, 649.0, 646.0, 629.0, 640.0, 621.0, 628.0, 665.0, 640.0, 657.0, 628.0, 658.0, 642.0, 752.0, 649.0, 601.0, 800.0, 605.0, 612.0, 692.0, 634.0, 619.0, 620.0, 652.0, 764.0, 663.0, 663.0, 710.0, 562.0, 884.0, 524.0, 533.0, 759.0, 467.0, 554.0, 820.0], [9571.0, 14223.0, 15842.0, 11159.0, 16297.999999999998, 12340.0, 15162.0, 16359.000000000002, 10285.0, 17126.0, 13501.0, 15486.0, 12771.0, 9677.0, 11949.0, 16739.0, 8452.0, 13257.0, 14615.0, 14561.0, 16689.0, 13906.0, 16029.0, 16439.0, 14767.0, 12806.0, 13728.0, 14402.0, 9144.0, 15636.0, 10142.0, 16408.0, 15954.0, 15123.0, 9668.0, 13788.0, 15405.0, 16122.0, 17062.0, 16149.999999999998, 15041.0, 12844.0, 11537.0, 12925.0, 13635.0, 15027.0, 17353.0, 12157.0, 13302.0, 14193.0, 11092.0, 15258.0, 12420.0, 17675.0, 15828.0, 13149.0, 15193.0, 15509.0, 14296.0, 15788.0, 14713.0, 12542.0, 14242.0, 16070.0, 14364.0, 9552.0, 11711.0, 9364.0, 15821.0, 11478.0, 16765.0, 12502.0, 15885.0, 13040.0, 16335.999999999998, 13008.0, 10582.0, 16077.000000000002, 13937.0, 11378.0, 13145.0, 11809.0, 12657.0, 11493.0, 12400.0, 14561.0, 12762.0, 13607.0, 13709.0, 17571.0, 15707.0, 11633.0, 19366.0, 9440.0, 11389.0, 12643.0, 15274.0, 13625.0, 14756.0, 8251.0], [23132.0, 19647.0, 24641.0, 24641.0, 23327.0, 23327.0, 22330.0, 22330.0, 23769.0, 23769.0, 25144.0, 22807.0, 26780.0, 25325.0, 21242.0, 25031.0, 25825.0, 18948.0, 20477.0, 22115.0, 22707.0, 18950.0, 28406.0, 21850.0, 23052.0, 21514.0, 24072.0, 25401.0, 19355.0, 18653.0, 23924.0, 28862.0, 17672.0, 22383.0, 25803.0, 23576.0, 22860.0, 25263.0, 21150.0, 27230.0, 24776.0, 25348.0, 27199.0, 20469.0, 24397.0, 25313.0, 20546.0, 19056.0, 23159.0, 21046.0, 21878.0, 29527.0, 19075.0, 23843.0, 25413.0, 21030.0, 27579.0, 21920.0, 23485.0, 22713.0, 17722.0, 28066.0, 20315.0, 17271.0, 25417.0, 21873.0, 24490.0, 27299.0, 25189.0, 21075.0, 27282.0, 25836.0, 18807.0, 19143.0, 22656.0, 26311.0, 24642.0, 24590.0, 22402.0, 25550.0, 24213.0, 20114.0, 19091.0, 21756.0, 18229.0, 22801.0, 18509.0, 27020.0, 18581.0, 20340.0, 23084.0, 22976.0, 24129.0, 25681.0, 17833.0, 25402.0, 29113.0, 23180.0, 25105.0, 29943.0]]

fig, axes = plt.subplots()

# Seaborn violin plot
sns.violinplot(data=a, width=0.6, color=&quot;w&quot; )

# Matplotlib violin plot
# axes.violinplot(a, showmeans=True, showmedians=False, showextrema=False, widths = 0.6)
# axes.set_xticks([y+1 for y in range(2)])
# axes.set_xticks([y+1 for y in range(4)])
# plt.setp(axes, xticks=[y+1 for y in range(4)],
         # xticklabels=['0', '1', '2', '3'])

plt.yscale('log' ,basey=10)

plt.show()"><pre class="notranslate"><code class="notranslate">import matplotlib.pyplot as plt
import seaborn as sns

a=[[195.0, 245.0, 142.0, 237.0, 153.0, 238.0, 168.0, 145.0, 229.0, 138.0, 176.0, 116.0, 252.0, 148.0, 199.0, 162.0, 134.0, 163.0, 130.0, 339.0, 152.0, 208.0, 152.0, 192.0, 163.0, 249.0, 113.0, 176.0, 123.0, 189.0, 150.0, 207.0, 184.0, 153.0, 228.0, 153.0, 170.0, 118.0, 302.0, 197.0, 211.0, 159.0, 228.0, 147.0, 166.0, 156.0, 167.0, 147.0, 126.0, 155.0, 138.0, 159.0, 139.0, 111.0, 133.0, 134.0, 131.0, 156.0, 240.0, 207.0, 150.0, 207.0, 265.0, 151.0, 173.0, 157.0, 261.0, 186.0, 195.0, 158.0, 272.0, 134.0, 221.0, 131.0, 252.0, 148.0, 178.0, 206.0, 146.0, 217.0, 159.0, 190.0, 156.0, 172.0, 159.0, 141.0, 167.0, 168.0, 218.0, 191.0, 207.0, 164.0], [689.0, 675.0, 648.0, 671.0, 647.0, 688.0, 776.0, 628.0, 680.0, 642.0, 682.0, 738.0, 659.0, 682.0, 616.0, 652.0, 781.0, 626.0, 629.0, 618.0, 628.0, 675.0, 604.0, 637.0, 601.0, 676.0, 682.0, 794.0, 788.0, 731.0, 635.0, 653.0, 641.0, 626.0, 639.0, 608.0, 654.0, 621.0, 783.0, 627.0, 784.0, 666.0, 721.0, 647.0, 644.0, 708.0, 653.0, 667.0, 656.0, 659.0, 626.0, 647.0, 683.0, 657.0, 720.0, 652.0, 624.0, 655.0, 609.0, 616.0, 655.0, 596.0, 619.0, 646.0, 701.0, 649.0, 646.0, 629.0, 640.0, 621.0, 628.0, 665.0, 640.0, 657.0, 628.0, 658.0, 642.0, 752.0, 649.0, 601.0, 800.0, 605.0, 612.0, 692.0, 634.0, 619.0, 620.0, 652.0, 764.0, 663.0, 663.0, 710.0, 562.0, 884.0, 524.0, 533.0, 759.0, 467.0, 554.0, 820.0], [9571.0, 14223.0, 15842.0, 11159.0, 16297.999999999998, 12340.0, 15162.0, 16359.000000000002, 10285.0, 17126.0, 13501.0, 15486.0, 12771.0, 9677.0, 11949.0, 16739.0, 8452.0, 13257.0, 14615.0, 14561.0, 16689.0, 13906.0, 16029.0, 16439.0, 14767.0, 12806.0, 13728.0, 14402.0, 9144.0, 15636.0, 10142.0, 16408.0, 15954.0, 15123.0, 9668.0, 13788.0, 15405.0, 16122.0, 17062.0, 16149.999999999998, 15041.0, 12844.0, 11537.0, 12925.0, 13635.0, 15027.0, 17353.0, 12157.0, 13302.0, 14193.0, 11092.0, 15258.0, 12420.0, 17675.0, 15828.0, 13149.0, 15193.0, 15509.0, 14296.0, 15788.0, 14713.0, 12542.0, 14242.0, 16070.0, 14364.0, 9552.0, 11711.0, 9364.0, 15821.0, 11478.0, 16765.0, 12502.0, 15885.0, 13040.0, 16335.999999999998, 13008.0, 10582.0, 16077.000000000002, 13937.0, 11378.0, 13145.0, 11809.0, 12657.0, 11493.0, 12400.0, 14561.0, 12762.0, 13607.0, 13709.0, 17571.0, 15707.0, 11633.0, 19366.0, 9440.0, 11389.0, 12643.0, 15274.0, 13625.0, 14756.0, 8251.0], [23132.0, 19647.0, 24641.0, 24641.0, 23327.0, 23327.0, 22330.0, 22330.0, 23769.0, 23769.0, 25144.0, 22807.0, 26780.0, 25325.0, 21242.0, 25031.0, 25825.0, 18948.0, 20477.0, 22115.0, 22707.0, 18950.0, 28406.0, 21850.0, 23052.0, 21514.0, 24072.0, 25401.0, 19355.0, 18653.0, 23924.0, 28862.0, 17672.0, 22383.0, 25803.0, 23576.0, 22860.0, 25263.0, 21150.0, 27230.0, 24776.0, 25348.0, 27199.0, 20469.0, 24397.0, 25313.0, 20546.0, 19056.0, 23159.0, 21046.0, 21878.0, 29527.0, 19075.0, 23843.0, 25413.0, 21030.0, 27579.0, 21920.0, 23485.0, 22713.0, 17722.0, 28066.0, 20315.0, 17271.0, 25417.0, 21873.0, 24490.0, 27299.0, 25189.0, 21075.0, 27282.0, 25836.0, 18807.0, 19143.0, 22656.0, 26311.0, 24642.0, 24590.0, 22402.0, 25550.0, 24213.0, 20114.0, 19091.0, 21756.0, 18229.0, 22801.0, 18509.0, 27020.0, 18581.0, 20340.0, 23084.0, 22976.0, 24129.0, 25681.0, 17833.0, 25402.0, 29113.0, 23180.0, 25105.0, 29943.0]]

fig, axes = plt.subplots()

# Seaborn violin plot
sns.violinplot(data=a, width=0.6, color="w" )

# Matplotlib violin plot
# axes.violinplot(a, showmeans=True, showmedians=False, showextrema=False, widths = 0.6)
# axes.set_xticks([y+1 for y in range(2)])
# axes.set_xticks([y+1 for y in range(4)])
# plt.setp(axes, xticks=[y+1 for y in range(4)],
         # xticklabels=['0', '1', '2', '3'])

plt.yscale('log' ,basey=10)

plt.show()
</code></pre></div>
<p dir="auto"><strong>Matplotlib</strong><br>
<a href="https://i.stack.imgur.com/pQGFU.png" rel="nofollow"><img src="https://camo.githubusercontent.com/25b8a08b666b46771b5b15f0253c9db298deb47eb37af3eab6e44f5c18e79242/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f70514746552e706e67" alt="matplotlib" data-canonical-src="https://i.stack.imgur.com/pQGFU.png" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Seaborn</strong><br>
<a href="https://i.stack.imgur.com/60yhS.png" rel="nofollow"><img src="https://camo.githubusercontent.com/39e992c45f569129a2c897b393bd2fbca32f6d7ae023853a0cb2a1daa18b6056/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f36307968532e706e67" alt="seaborn" data-canonical-src="https://i.stack.imgur.com/60yhS.png" style="max-width: 100%;"></a></p>
<p dir="auto">The  <a href="https://seaborn.pydata.org/generated/seaborn.swarmplot.html#" rel="nofollow">online docs page for swarmplot</a> uses "dodge" in an example of the behaviour of "split".</p>
<p dir="auto">Copied from the doc page:</p>
<blockquote>
<p dir="auto"><strong><em>Split</em></strong> each level of the hue variable along the categorical axis:</p>
<blockquote>
<p dir="auto">ax = sns.swarmplot(x="day", y="total_bill", hue="smoker",<br>
...                    data=tips, palette="Set2", <strong><em>dodge</em></strong>=True)</p>
</blockquote>
</blockquote>