我正在創建一個包含x
和y
值的圖。 y axis
正常,但x
與對數值。我使用庫(jfreechart.jar
)來製作這個對數圖。如何根據y找到x值
我的問題是如何在罰款的精確值x
如果例如y是10
? (x的值是對數數)
private void interActionPerformed(java.awt.event.ActionEvent evt) {
final XYSeries s1 = new XYSeries("Series 1");
s1.add(0.075,4.8);
s1.add(0.15,13.9);
s1.add(0.425,19.5);
s1.add(0.6,22.1);
s1.add(1.18,26.6);
s1.add(2,29.5);
s1.add(2.36,31.2);
s1.add(4.75,38.6);
s1.add(9.5,46.2);
s1.add(19,62.4);
s1.add(25,76.);
s1.add(37.5,86.2);
s1.add(50,100);
final XYSeriesCollection dataset = new XYSeriesCollection();
dataset.addSeries(s1);
final JFreeChart chart = ChartFactory.createXYLineChart(
"sieve analyese", // chart title
"sieve size", // domain axis label
"passing", // range axis label
dataset, // data
PlotOrientation.VERTICAL,
true, // include legend
true,
false
);
final XYPlot plot = chart.getXYPlot();
final LogarithmicAxis domainAxis = new LogarithmicAxis("particle size in milimeters");
final NumberAxis rangeAxis = new NumberAxis("percent passing");
plot.setDomainAxis(domainAxis);
plot.setRangeAxis(rangeAxis);
BarRenderer renderer = null;
ChartFrame frame = new ChartFrame("sive chart", chart);
frame.setVisible(true);
frame.setSize(1000,600);
chart.setBackgroundPaint(Color.lightGray);
plot.setOutlinePaint(Color.RED);
} [chart of x and y value][1]
that's'java'而不是'javascript' – SomeJavaGuy
和注意到所有與mathematica ..標籤刪除。 – agentp