1
$\begingroup$

I have:

data = {8.794711103640918`, 11.22409306604482`, 16.704326795188503`, 15.009409146999735`, 18.39924444337727`, 10.489628751829688`, 5.461401310830476`, 5.800384840468229`, 2.5235440539699443`, 1.67608522987556`, 4.161964447219086`}

Then, BarChart gives

BarChart[data, ChartLabels -> Range[1, 10]~Join~{">10"}, ChartStyle ->{RGBColor[0.528488, 0.470624, 0.701351],
RGBColor[0.528488, 0.470624, 0.701351], RGBColor[0.528488, 0.470624, 0.701351], RGBColor[0.528488, 0.470624, 0.701351],
RGBColor[0.528488, 0.470624, 0.701351],
RGBColor[0.528488, 0.470624, 0.701351],
RGBColor[0.528488, 0.470624, 0.701351],
RGBColor[0.528488, 0.470624, 0.701351],
RGBColor[0.528488, 0.470624, 0.701351], 
RGBColor[0.528488, 0.470624, 0.701351],
RGBColor[0.528488, 0.470624, 0.701351]}, BarSpacing -> 0.8, PlotRange -> {0, 20}, AspectRatio -> 0.66, Frame -> True, ImageSize -> Large, BaseStyle -> {FontFamily -> "Latin Modern Math"}, LabelStyle -> {22, GrayLevel[0]}, 
FrameLabel -> {Style["\[NumberSign] Bacteria per cell", FontFamily -> "Latin Modern Math"],  Style["% Scored cells", FontFamily -> "Latin Modern Math"]}]

enter image description here

I have two questions:

  1. How can I remove ticks on the right and the upper sides of the box.

  2. How can I have ticks, on the left side only on 5, 10, 15, and 20 and rename them as 5%, 10%, 15%, and %20 and remove number 0.

$\endgroup$

1 Answer 1

2
$\begingroup$

Mathematica graphics

leftTicks = Table[{i, Row[{i, "%"}]}, {i, Range[5, 20, 5]}]
BarChart[data, ChartLabels -> Range[1, 10]~Join~{">10"}, 
 ChartStyle -> {RGBColor[0.528488, 0.470624, 0.701351], 
   RGBColor[0.528488, 0.470624, 0.701351], 
   RGBColor[0.528488, 0.470624, 0.701351], 
   RGBColor[0.528488, 0.470624, 0.701351], 
   RGBColor[0.528488, 0.470624, 0.701351], 
   RGBColor[0.528488, 0.470624, 0.701351], 
   RGBColor[0.528488, 0.470624, 0.701351], 
   RGBColor[0.528488, 0.470624, 0.701351], 
   RGBColor[0.528488, 0.470624, 0.701351], 
   RGBColor[0.528488, 0.470624, 0.701351], 
   RGBColor[0.528488, 0.470624, 0.701351]}, BarSpacing -> 0.8, 
 PlotRange -> {0, 20}, AspectRatio -> 0.66, Frame -> True, 
 ImageSize -> Large, BaseStyle -> {FontFamily -> "Latin Modern Math"},
  LabelStyle -> {22, GrayLevel[0]}, 
 FrameLabel -> {Style["\[NumberSign] Bacteria per cell", 
    FontFamily -> "Latin Modern Math"], 
   Style["% Scored cells", FontFamily -> "Latin Modern Math"]},
 FrameTicks -> {{leftTicks, None}, {Automatic, None}} 
 ]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.