使用框架而不是轴时不裁剪条形图
我刚刚发现使用 Frame
而不是 Axes
时,BarChart
可能会被裁剪。
示例:
data = {.2, .4, .6, 0., 0., 0.}
BarChart[data]
BarChart[data, Frame -> True, Axes -> False]
这是一个功能还是一个错误?如果它是一个功能,是否有一种简单的方法可以防止裁剪?
编辑
屏幕截图,根据请求:
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 -> 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:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯,情况并不总是这样:
Well, It was not always like that:
使用
PlotRange
怎么样?...Edit
我开始认为这确实是一个错误。看看如果我们简单地改变数据中元素的顺序会发生什么。它承认(但不显示基线)之前忽略的零高度条。
请注意,这次我不必使用
PlotRange
调整显示。How about using
PlotRange
?...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.