1

I am creating a correlation matrix in JFreeChart. I'm nearly done except that both axes have number values (i: say 1 to 20). I use DefaultXYZDataset and a customized BlockRenderer with a overridden PaintScale Class. The value z itself is represented by the colour of a filled rectangle at the positions (x,y) in ([1 to 20], [1 to 20]).

Is it possible to replace the axis labels on X and Y by a String e.g. names[i]? To achieve this, have I to change the NumberAxes into CategoryAxes? Both axes needed to be categorical since I need coordinates like ("ParameterA", "ParameterB"). I guess i would need a special renderer then and the whole code had to be modified. On first sight this isn't even possible. I didn't found a suitable Dataset for that task.

Or could i simply change some kind of tick label format?

Mika Prouk
  • 495
  • 5
  • 16

1 Answers1

1

SymbolAxis, illustrated here, is a NumberAxis and might be a suitable choice.

image

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