我正在尝试找到生成带有标签的基于1D时间的绘图的最佳策略.当前看起来像这样:
I am trying to find the best strategy to produce a 1D time based plot with labels. It currently looks like this:
问题在于时间跨度很少发生,而其他时间间隔密度很高.
The problem is there is spans of time where very little happens, and others with high density.
我想实现的是扭曲时间轴,以便在密集区域中将标签隔开以避免重叠.另外,我可以想象在没有轴失真的情况下显示实际数据点,但要分配标签以使它们不重叠.
What I would like to achieve is to distort the time axis so that in the dense areas the labels are spaced apart to avoid overlap. Alternatively, I could imagine to show the actual data points without axis distortion, but distribute the labels so that they do not overlap.
编辑:这是我尝试手动清理混乱的信息,以了解我想要的输出:
EDIT: This is my attempt to clean up the mess manually, to get an idea of which output I would like to have:
推荐答案
您可以尝试使用setDomainPannable()和setMouseWheelEnabled()进行平移和缩放的某种组合,如此处和此处.右键单击以查看上下文菜单,然后按住Control键单击以进行平移(在Mac OS X上按住Option键单击).
You might experiment with some combination of pan and zoom using setDomainPannable() and setMouseWheelEnabled(), seen here and here. Right-click to see the context menu and control-click to pan (option-click on Mac OS X).
更多推荐
避免在时间序列一维绘图中项目标签重叠(JFreeChart)
发布评论