11
$\begingroup$

Is there something similar to seaborn stripplot in mathematica? The graph I am trying to make is like this: enter image description here

$\endgroup$
  • $\begingroup$ Do you have any sample data that can be used by people who want to try things out? $\endgroup$ – J. M. will be back soon Dec 16 '16 at 4:16
13
$\begingroup$

This can be done with DistributionChart and a bit of programming:

data = Table[
   RandomVariate[NormalDistribution[RandomInteger[5], 1], 30], {7}];

DistributionChart[data, ChartStyle -> "Rainbow", 
 ChartElementFunction -> "PointDensity"]

enter image description here

DistributionChart[data, ChartStyle -> "Rainbow", 
 ChartElementFunction -> ({AbsolutePointSize[5], 
     Point[Transpose[{RandomReal[#1[[1]], Length[#2]], #2}]]} &)]

enter image description here

$\endgroup$
4
$\begingroup$

Just adding OP's styling to @BrettChampion's answer:

 data = Table[RandomVariate[NormalDistribution[0, 10], 
 RandomInteger[{10, 100}]], {4}];
 DistributionChart[data - Min@Flatten@data, BarSpacing -> 2, 
 AspectRatio -> 1.5, PlotRange -> {{1/2, Automatic}, {0, Automatic}}, 
 ChartStyle -> "Rainbow", Frame -> True, 
 FrameLabel -> {"Day", "Total_Bill"}, 
 GridLines -> {{}, 10 # & /@ Range[0, Max@Flatten@data]}, 
 ChartLabels -> {"Thur", "Fri", "Sat", "Sun"}, 
 ChartElementFunction -> ({AbsolutePointSize[5], 
 Point[Transpose[{RandomReal[#[[1]], Length[#2]], #2}]]} &)]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.