I am plotting frequency in Hz, using the TimeSeriesChart. So far so good. But I need to add a second Y (value) axis that would represent musical tones. I need the ticks to be represented by String values (C#9,A4 and so on), so I figured out I should use SymbolAxis. The problem is I need to map the string tick values to exact number values, such as: A4->440, A#4->466.164, B4->493.883, C5 ->523.251..... So it won't be linear nor logarithmic. How can I do that? Thanks.

(v1.0.17)

有帮助吗?

解决方案

I answered this question in the JFreeChart forum already, you could achieve this by subclassing the NumberAxis class and overriding the refreshTicks() method to return tick labels for specific values only (and with whatever label you require).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top