FrameTicks in BarChart

2

I am finding it a strange issue. I want to make a BarChart as

BarChart[{1, 2, 3, 4}, Frame -> True, 
FrameTicks -> {{{1, 2, 3, 4}, {1, 2, 3, 4}}, {{1, 2, 3, 4}, None}}]

And i want to control FrameTicks according to my will. The strange part is, if I keep one of the axis as None then I get no error as shown below.

But if I mark all four sides of Frame using Frame ticks, it does not give me required result. Can't figure out the problem.

enter image description here

zenith

Posted 2015-02-13T11:49:53.777

Reputation: 509

Code same as shown in question.As you can see, in FrameTicks marked 3 sides of Frame, and left the fourth side as "None". If I put values for fourth side also, it does not give me out put. For example if on place of "None", I put {1,2,3,4}, I get figure with problem it gives following messages A tick style in the value of the Ticks option is not a directive. A tick specification in the value of FrameTicks should be a number or list. – zenith – 2015-02-13T11:55:56.453

BarChart[{1, 2, 3, 4}, Frame -> True, FrameTicks -> {{{1, 2, 3, 4}, {1, 2, 3, 4}}, {{1, 2, 3, 4}, {1, 2, 3, 4}}}] works for me – Kuba – 2015-02-13T11:58:24.750

Not for me. I don't know why – zenith – 2015-02-13T12:00:08.097

What version and os are you working on? Have copied my code, maybe there is a mistake in yours? – Kuba – 2015-02-13T12:01:52.667

Its Mathematica 8.0 and Windows7. The thing is FrameTicks worked well for Plot but strangely not for BarChart – zenith – 2015-02-13T12:03:55.380

I can confirm this bug in version 8. So I'm tagging this as a bug that's specific to that version. – Jens – 2015-02-13T23:37:50.893

Answers

1

This seems to be a bug in Mathematica version 8, and it can be fixed by specifying the FrameTicks outside of BarChart using a Show wrapper:

Show[BarChart[{1, 2, 3, 4}], Frame -> True, 
 FrameTicks -> {{{1, 2, 3, 4}, {1, 2, 3, 4}}, {{1, 2, 3, 4}, {1, 2, 3,4}}}]

barchart

Jens

Posted 2015-02-13T11:49:53.777

Reputation: 93 191