Avoid item label overlap in time series 1D plots (JFreeChart)
Asked Answered
C

1

1

I am trying to find the best strategy to produce a 1D time based plot with labels. It currently looks like this:

enter image description here

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:

enter image description here

Complexioned answered 9/10, 2013 at 19:57 Comment(0)
L
4

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).

Languet answered 10/10, 2013 at 0:18 Comment(2)
Thanks, that is useful, although it doesn't solve the problem of getting out a nice looking PDF. I still need to manually distort the items, although being able to zoom+pan helps in the clean up process. I was more thinking of a non-linear transformation applied to the domain axis.Complexioned
Maybe like Mac OS X Dock or Windows Magnifier? Sorry, I don't know of any support for automating this in JFreeChart.Languet

© 2022 - 2024 — McMap. All rights reserved.