2
$\begingroup$

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

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – zenith Feb 13 '15 at 11:55
  • $\begingroup$ 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 $\endgroup$ – Kuba Feb 13 '15 at 11:58
  • $\begingroup$ Not for me. I don't know why $\endgroup$ – zenith Feb 13 '15 at 12:00
  • $\begingroup$ What version and os are you working on? Have copied my code, maybe there is a mistake in yours? $\endgroup$ – Kuba Feb 13 '15 at 12:01
  • $\begingroup$ Its Mathematica 8.0 and Windows7. The thing is FrameTicks worked well for Plot but strangely not for BarChart $\endgroup$ – zenith Feb 13 '15 at 12:03
1
$\begingroup$

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

$\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.