Saturday, December 14, 2019

Histograms for ResourceData


bwr=ResourceData["Sample Data: Birth Weight Risk"]; bwr[1;;5]



h1=Histogram[bwr[Select[#Smoker==False&], "BWT"],50,
                                 ChartElementFunction -> "GlassRectangle",

ChartStyle -> "Rainbow"];
h2=Histogram[bwr[Select[#Smoker==True&], "BWT"],30,
                                 ChartElementFunction -> "GlassRectangle",

ChartStyle ->"Pastel"];
Show[h1,h2,ImageSize->Large,

PlotLabel-> {"Birth Weight for Smokers vs Non-Smokers"}]


No comments:

Post a Comment