Mathematica:直方图中不需要的垂直线
当将直方图的绘图范围从“自动”更改为超出自动计算的绘图范围的绘图范围时,Mathematica 会绘制一条我无法摆脱的不需要的水平线(请参见值 -4 处的右侧直方图)。有人对这个问题有建议吗?
我在 Mac OS 10.7.2 上运行 Mathematica V.8.0.1.0。
In[1099]:=
data = {-1.2056, -1.46192, -1.30053, -2.52879, -0.99636, -1.73904, -1.164,
-1.83398,-0.97505, -0.503256, -0.63802, -0.785963, -0.711821, -0.820439, -1.8699,
-3.9659, -1.4456, -1.67021, -1.42009, -2.5644, -1.45002, -1.27806, -1.66529,
-1.67073, -3.31102, -3.38638};
HistogramLeft=Histogram[data, PlotRange -> Automatic]
HistogramRight=Histogram[data, PlotRange -> {-8, 0}]
When changing the plot range of a histogram from Automatic to a plot range which exceeds the automatically calculated plot range, Mathematica draws an unwanted horizontal line which I cannot get rid of (see right histogram at value -4). Does anyone have a suggestion on that issue?
I'm running Mathematica V.8.0.1.0 on Mac OS 10.7.2.
In[1099]:=
data = {-1.2056, -1.46192, -1.30053, -2.52879, -0.99636, -1.73904, -1.164,
-1.83398,-0.97505, -0.503256, -0.63802, -0.785963, -0.711821, -0.820439, -1.8699,
-3.9659, -1.4456, -1.67021, -1.42009, -2.5644, -1.45002, -1.27806, -1.66529,
-1.67073, -3.31102, -3.38638};
HistogramLeft=Histogram[data, PlotRange -> Automatic]
HistogramRight=Histogram[data, PlotRange -> {-8, 0}]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来您正在使用
Frame -> {{True, False}, {True, False}}
(或类似的东西。)如果是这种情况,您可以使用Axes->False
完全关闭法线轴。It looks like you're using
Frame -> {{True, False}, {True, False}}
(or something similar.) If that's the case, you can turn off the normal axes entirely withAxes->False
.查看选项 AxesOrigin。
Look at the option AxesOrigin.
如果我明白你想要什么,我想这很容易。
顺便
说一下,Mathematica 有一个新的堆栈交换,位于 https://mathematica.stackexchange.com/
If I understand what you want, this is pretty easy, I think.
Try
By the way, there is a new stack exchange for Mathematica at https://mathematica.stackexchange.com/