避免在时间序列一维绘图中项目标签重叠(JFreeChart) [英] Avoid item label overlap in time series 1D plots (JFreeChart)

查看:124
本文介绍了避免在时间序列一维绘图中项目标签重叠(JFreeChart)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到生成带有标签的基于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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆