1

I'm plotting my data in a bar chart and would like to draw vertical lines between particular bars to segment the plot into domains:

Example

I haven't been able to find a library that can do this. jfreechart has so called domain markers but draws them through the middle of the bars, so you're really marking individual bars instead of domains:

Example

Does anyone know a library that can do what I want?

jonas87
  • 672
  • 2
  • 8
  • 22

1 Answers1

2

JFreechart includes a number of Marker subclasses that are pictured among the Miscellaneous > Markers section of the samples. In addition, many plots allow customizing the gridline and/or crosshair Stroke. For arbitrary lines and shapes, consider one of the org.jfree.chart.annotations, such as XYLineAnnotation, demonstrated here.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045