避免在时间序列一维绘图中项目标签重叠(JFreeChart)

编程入门 行业动态 更新时间:2024-10-28 19:25:23
本文介绍了避免在时间序列一维绘图中项目标签重叠(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)

本文发布于:2023-07-17 17:43:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1135691.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:序列   标签   时间   项目   JFreeChart

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!