Not cropping BarChart when using Frame instead of Axes
I just found out that a BarChart
may get cropped when using Frame
rather than Axes
.
Example:
data = {.2, .4, .6, 0., 0., 0.}
BarChart[data]
BarChart[data, Frame -> 开发者_JAVA技巧True, Axes -> False]
Is this a feature or a bug? If it is a feature, is there an easy way to prevent cropping?
EDIT
Screenshot, per request:
Well, It was not always like that:
How about using PlotRange
?...
data = {.2, .4, .6, 0., 0., 0.}
BarChart[data]
BarChart[data, Frame -> True, Axes -> False,
PlotRange -> {{.5, 6.5}, {0, .7}},
FrameTicks -> {None, Automatic, None, None}]
Edit
I'm beginning to think it is indeed a bug. Look what happens if we simply change the order of the elements in data. It acknowledges (but does not display the baseline of) the bars of zero height that it previously ignored.
Notice that I didn't have to tweak the display using PlotRange
this time around.
精彩评论