Consider the following:
SetOptions[Histogram, BarOrigin -> Left,
Frame -> {{True, None}, {True, None}}, FrameTicks -> Automatic];
data1 = {Table[1, {i, 5}], Table[5, {i, 50}], Table[3, {i, 25}],
Table[4, {i, 20}]};
data2 = {Table[1, {i, 3}], Table[5, {i, 20}], Table[3, {i, 25}]};
data3 = {Table[1, {i, 3}], Table[5, {i, 20}], Table[4, {i, 15}]};
histo1 = Histogram[data1]
histo2a = Show[Histogram[data1, ChartElements -> None],Histogram[data2]]
histo3a = Show[Histogram[data1, ChartElements -> None],Histogram[data3]]
histo2b = Show[Histogram[data1], Histogram[data2, ChartStyle -> Red]]
histo3b = Show[Histogram[data1], Histogram[data3, ChartStyle -> Red]]
I would like to use the same frame/coordinate system for histo2a
and histo3a
as in histo1
. histo3b
shows how it should be (only without the grey part) and histo2a
how it should not be. histo2b
in addition shows the disadvantage of the Show[]
-approach (one bar exceeds the frame).
Due to the latter, I was trying to extract the FrameTicks-values from histo1
and to use them for Histogram[data2]
and Histogram[data3] but neither
Options[histo1,FrameTicks],
AbsoluteOptions[histo1,FrameTicks]nor
HistogramList[data1]` return help.
Now I would like to use exactly the same frame ticks, which were calculated based on data1
for histo2
.
Neither Options[histo1,FrameTicks]
, AbsoluteOptions[histo1,FrameTicks]
or HistogramList[data1]
help. Has anyone an idea?
Histogram[data2,{HistogramList[data1][[1]]}]
does not do what you want ? $\endgroup$