How to hide JFreeChart XYSeries yaxis?
Is there a way to hide a JFreeChart XYSeries yaxis? The yaxis is mean开发者_开发百科ingless on logic analyzer display.
You can use setVisible()
, as shown below.
XYPlot plot = (XYPlot) chart.getPlot();
ValueAxis range = plot.getRangeAxis();
range.setVisible(false);
hide horizontal and vertical labels
ValueAxis range = xyPlot.getRangeAxis();
range.setVisible(false);
ValueAxis domain = xyPlot.getDomainAxis();
domain.setVisible(false);
精彩评论