Formatting 在Mathematica中,我们可以减少条形图中的条形尺寸宽度吗?
Formatting 在Mathematica中,我们可以减少条形图中的条形尺寸宽度吗?,formatting,wolfram-mathematica,bar-chart,Formatting,Wolfram Mathematica,Bar Chart,可以减小条形图的宽度吗?您可以增大条形图的间距,而不是改变条形图的宽度 dalist = {901, 503, 522, 1305} cogColors = {RGBColor[0, 0, 1], RGBColor[1, 0, 0], RGBColor[0, 1, 0], RGBColor[1, 1, 0]} BarChart[dalist, ChartStyle -> cogColors] 条形图不打算这样做。您只能更改间距 如果需要更精细的控制,请使用矩形图: BarChar
可以减小条形图的宽度吗?您可以增大条形图的间距,而不是改变条形图的宽度
dalist = {901, 503, 522, 1305}
cogColors = {RGBColor[0, 0, 1], RGBColor[1, 0, 0], RGBColor[0, 1, 0], RGBColor[1, 1, 0]}
BarChart[dalist, ChartStyle -> cogColors]
条形图不打算这样做。您只能更改间距 如果需要更精细的控制,请使用矩形图:
BarChart[dalist, ChartStyle -> cogColors, BarSpacing -> 1]
参见海克对我的问题的回答。您需要使用
矩形图表
。如果您想在条形图中心之间保持恒定的距离,以便条形图加间距占据恒定的空间,您可以将ChartElementFunction
选项与辅助功能一起使用,如Heike的回答所示。(这也可以使用条形图
,实现您想要的功能,但我仍然建议使用矩形图
)我可能没有抓住要点,但您不能仅仅更改纵横比吗
RectangleChart[{{{1, 1}, {1, 1}, {1, 1}}, {{2, 2}, {2, 2}, {2, 2}}}]
Up选民,如果你还没有投票给海克,请也投票给他关于另一个问题的答案
BarChart[dalist, ChartStyle -> cogColors, AspectRatio -> 3, ImageSize -> 120]