条形图标签不匹配

时间:2021-06-12 07:32:01

标签: r bar-chart axis-labels

我想在条形图上添加一个旋转 45 度的 x 标签,因此我绘制了一个无标签条形图并使用 <Window.Resources> <spec:StringCollection x:Key="strings"> <sys:String>First</sys:String> <sys:String>Second</sys:String> <sys:String>Third</sys:String> </spec:StringCollection> <Style x:Key="ItemStyle" TargetType="ContentPresenter"> <Setter Property="ContextMenu"> <Setter.Value> <ContextMenu> <TextBlock Text="{Binding}"/> </ContextMenu> </Setter.Value> </Setter> </Style> </Window.Resources> <ItemsControl ItemsSource="{StaticResource strings}" ItemContainerStyle="{StaticResource ItemStyle}"/> 函数添加这些标签。但是,我发现我的标签并没有像我在 text 参数(从 1 到 10)中设置的那样准确地定位在每个条形的中心。为什么会发生这种情况以及如何解决?首先感谢您的任何建议。

barplot example

我的代码:

x

0 个答案:

没有答案
相关问题