1
$\begingroup$

I'm trying to do a BoxWhiskerChart in Mathematica with a very specific Style. Specifically, I'm trying to get the y-axis labels (the numbers) to be bigger (point 72). The , AxesStyle -> {Directive[Black, 72], Directive[Black, 72]} doesn't work. The whole Code is:

green = RGBColor[0, 184/255, 123/255];
blue = RGBColor[0.56, 0.875, 0.94];
(*Create Boxplot*)
BoxWhiskerChart[Normal[{
   dataset1[
     Select[#Sector == "Consumer" &], "ROE"] // Normal,
   dataset1[
     Select[#Sector == "Finance" &], "ROE"] // Normal,
   dataset1[
     Select[#Sector == "Health" &], "ROE"] // Normal,
   dataset1[
     Select[#Sector == "Industrials" &], "ROE"] // Normal,
   dataset1[
     Select[#Sector == "Materials" &], "ROE"] // Normal
   }], Background -> RGBColor[240/255, 240/255, 240/255],
 ChartLabels -> 
  Placed[{"Consumer", "Finance", "Health", "Industrials", 
    "Materials"}, Axis, Style[#, 72, Black] &], 
 ChartStyle -> {green, green, blue, green, green}, 
 AxesStyle -> {Directive[Black, 72], Directive[Black, 72]}, 
 ImageSize -> 2400]

Since that code only works with a specific data input file, I attached a picture of the outcome. Thanks so much for any help guys![The Labels in the red circles need to Point 72 (like "Consumer"]1

$\endgroup$
2
$\begingroup$
data = RandomReal[{0, 1}, {5, 100}];
green = RGBColor[0, 184/255, 123/255];
blue = RGBColor[0.56, 0.875, 0.94];
yticks = {#, #, {.01, 0}} & /@ Range[0, 1, .2];
bwc = BoxWhiskerChart[data, 
  Background -> RGBColor[240/255, 240/255, 240/255], 
  ChartLabels -> Placed[{"Consumer", "Finance", "Health", "Industrials", 
     "Materials"}, Axis, Style[#, 72, Black] &], 
  ChartStyle -> {green, green, blue, green, green}, 
  FrameTicksStyle -> {Directive[Black, 72], Directive[Black, 72]}, 
  FrameTicks -> {{yticks, yticks}, {Automatic, Automatic}}, 
  ImageSize -> 2400]

Mathematica graphics

Note: you can also specify yticks as a function:

yticks = Function[{min, max}, {#, #, {.01, 0}} & /@ Round[Range[min, max, .2], .2]];
$\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.