Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am using the PairedBarChart feature as follows:

PairedBarChart[Range[5], Range[5], BarOrigin -> "XAxis"]

enter image description here

How can I (i) remove and (ii) change the number of the small tick marks on the y-axis (i.e., the ones between the numbers 1, 2, 3, ...)?

Thanks for your help!

share|improve this question
1  
Try: PairedBarChart[Range[5], Range[5], BarOrigin -> "XAxis", Ticks -> {{None}, {None}}] –  Boson Mar 21 at 17:33
    
Or if you want the whole y-axis gone: PairedBarChart[Range[5], Range[5], BarOrigin -> "XAxis"] /. Deploy[__] :> {}. –  Silvia Mar 21 at 17:43
    
Thanks for your help. Your comments work for the original question. Actually my problem is a bit different so I changed the question now (I thought the answer to the original question would solve the problem but it didn't). Maybe you have an idea for the new question as well. Thanks! –  Posch79 Mar 21 at 17:57
add comment

1 Answer 1

Regrettably, I don't believe such an option is intrinsic to PairedBarChart. You can directly manipulate the graphic object to accomplish this, e.g.:

g = PairedBarChart[Range[10], Range[10], BarOrigin -> "XAxis"];
g[[1, 2, 2, 1, 1, 1, 3, 1, 2]] = {};
g[[1, 2, 2, 1, 2, 1, 3, 1, 2]] = {};

enter image description here

If you're going to need this often, probably best to make a simple function that parses content of object and monkey-patches it to remove ticks...

share|improve this answer
    
Thanks. Is it also possible not to remove the small ticks but to change the number of small ones between the large ones? –  Posch79 Mar 23 at 17:46
    
@Posch79: Sure, using the same kind of method - just poke around at the structure of the graphic object. Other options (not precisely same output) might be one of the custom ticks packages out there in the ether, or using a frame with user-generated frame ticks. We all hope WRI adds more tick-control options in future versions: you can see this kind of question pop up here quite a bit... –  rasher Mar 23 at 21:51
    
Could you provide a code example how to do that? Thank you so much. –  Posch79 Mar 24 at 0:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.