Reputation: 515
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?
Upvotes: 1
Views: 178
Reputation: 205785
SymbolAxis
, illustrated here, is a NumberAxis
and might be a suitable choice.
Upvotes: 1