0
$\begingroup$

I have such data

data = Uncompress[FromCharacterCode[
   Flatten[ImageData[Import["http://i.stack.imgur.com/ragWk.png"],"Byte"]]]]

<|0 -> 2, 1 -> 1, 2 -> 2, ..., 244 -> 1, 250 -> 2, 251 -> 1, 254 -> 1|>

If I plot it directly

BarChart[data, ChartLabels -> Automatic]

As you see, I cannot bear that dense labels. Now I just want to show Range[0,255,10]. Is possible?

$\endgroup$
1
$\begingroup$

How about this? I don't know why data at 254 does not show up.

  Graphics[Inset[
  BarChart[data, ChartLabels -> Automatic, Axes -> False, 
   PlotRangePadding -> 0, ImagePadding -> 0], {0, 0}, {0, 0}, {255, 
   155}], Axes -> True, Frame -> True, 
 FrameTicks -> {{Range[0, 155, 20], None}, {Range[0, 255, 20], None}},
  PlotRange -> {{0, 255}, {0, 155}}]

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.