I managed to turn the ticks inside-out but the ticks go now through the numbers. In fact I would like to have it like in the picture attached (ticks pointing outside the plot and no additional ticks between the numbers). Has anyone a suggestion?
data={-1.2056,-(7288960271654/4985881289361),-1.30053,-(33199059446612625/13128459048331036),-(5130109517723890585/5148852459134416857),-1.73904,-1.164,-1.83398,-0.97505,-(152151059187768664247/302333262014074402254),-(33596749386427335752225/52657796909983176600514),-0.785963,-0.398132,-(2414923435622638997136189344226575/3392598745831412249336953513454508),-0.820439};
a=First[HistogramList[data]]
b=Range[Max[Last[HistogramList[data]]]]
Histogram[
data,
BarOrigin->Left,
Axes->False,
Frame->{{True,None},{True,None}},
FrameTicks->{
{Transpose[{a,a,Table[{-0.02,0},{i,Length[a]}]}],None},
{Transpose[{b,b,Table[{-0.02,0},{i,b}]}],None}
}
]
Answer
This works, but it does require some manual tweaking
Histogram[data, BarOrigin -> Left, Axes -> False,
Frame -> {{True, None}, {True, None}},
FrameTicks -> {{Transpose[{a,
Row[{#, Pane["", {10, Automatic}]}] & /@ a,
Table[{-0.02, 0}, {i, Length[a]}]}],
None}, {Transpose[{b,
Pane[#, {Automatic, 20}, Alignment -> {Center, Bottom}] & /@ b,
Table[{-0.02, 0}, {i, b}]}], None}}]
Comments
Post a Comment