MATLAB: Adding a scatter of points to a boxplot

boxplotscatter

Does anyone come with with a code which can match the python generated boxplot?

Best Answer

Indeed, that seems to work just fine...
load carsmall MPG % the sample dataset variable
hold on
scatter(ones(size(MPG)).*(1+(rand(size(MPG))-0.5)/10),MPG,'r','filled')
yields
It's possible to add color with value scaling in scatter see the details on it for all the particulars.