本文导读目录:
y轴标题jfreechart(jfreechart怎么自由定义Y轴坐标,比如数据值设置为,,,
jfreechart怎么自由定义Y轴坐标,Bǐ如Shù据值设置为,,,
NumberAxisnumberAxis=(NumberAxis)plot.getRangeAxis();numberAxis.setAutoTickUnitSelection(false);doubleunit=d;//刻度的长度NumberTickUnitntu=newNumberTickUnit(unit);numberAxis.setTickUnit(ntu);DateAxisxAxis=newDateAxis(xName);xAxis.setRange(start_time,end_time);xAxis.setAutoTickUnitSelection(false);xAxis.setTickUnit(newDateTickUnit(DateTickUnit.MINUTE,));plot.setDomainAxis(xAxis);
2025年1月三星u108(诺基亚6700c怎么样)求一个用jfreechart生成多个Y轴的代码
Kè以Kànjfreechart得官方原码,里面讲的很详细,下缅把一个例子给Nǐ,应该就是你要的效果importjava.awt.Color;importjava.awt.Dimension;importjavax.swing.JPanel;import.jfree.chart.ChartFactory;import.jfree.chart.ChartPanel;import.jfree.chart.ChartUtilities;import.jfree.chart.JFreeChart;import.jfree.chart.axis.AxisLocation;import.jfree.chart.axis.NumberAxis;import.jfree.chart.axis.ValueAxis;import.jfree.chart.plot.PlotOrientation;import.jfree.chart.plot.XYPlot;import.jfree.chart.renderer.xy.Sta ndardXYItemRenderer;import.jfree.chart.renderer.xy.XYItemRenderer;import.jfree.chart.title.TextTitle;import.jfree.data.time.Minute;import.jfree.data.time.RegularTimePeriod;import.jfree.data.time.TimeSeries;import.jfree.data.time.TimeSeriesCollection;import.jfree.data.xy.XYDataset;import.jfree.ui.ApplicationFrame;import.jfree.ui.RefineryUtilities;publilassMultipleAxisDemoextendsApplicationFrame{publicMultipleAxisDemo(StringparamString){super(paramString);ChartPanellocalChartPanel=(ChartPanel)createDemoPanel();localChartPanel.setPreferredSize(newDimension(,));localChartPanel.setDomainZoomable(true);localChartPanel.setRangeZoomable(true);setContentPane(localChartPanel);}privatestaticJFreeChartcreateChart(){XYDatasetlocalXYDataset=createDataset(“Series“,.D,newMinute(),);JFreeChartlocalJFreeChart=ChartFactory.createTimeSeriesChart(“MultipleAxisDemo“,“TimeofDay“,“PrimaryRangeAxis“,localXYDataset,true,true,false);localJFreeChart.addSubtitle(newTextTitle(“Fourdatasetsandfourrangeaxes.“));XYPlotlocalXYPlot=(XYPlot)localJFreeChart.getPlot();localXYPlot.setOrientation(PlotOrientation.VERTICAL);localXYPlot.setDomainPannable(true);localXYPlot.setRangePannable(true);localXYPlot.getRangeAxis().setFixedDimension(.D);NumberAxislocalNumberAxis=newNumberAxis(“RangeAxis“);localNumberAxis.setFixedDimension(.D);localNumberAxis.setAutoRangeIncludesZero(false);localXYPlot.setRangeAxis(,localNumberAxis);localXYPlot.setRangeAxisLocation(,AxisLocation.BOTTOM_OR_LEFT);XYDatasetlocalXYDataset=createDataset(“Series“,.D,newMinute(),);localXYPlot.setDataset(,localXYDataset);localXYPlot.mapDatasetToRangeAxis(,);StandardXYItemRendererlocalStandardXYItemRenderer=newStandardXYItemRenderer();localXYPlot.setRenderer(,localStandardXYItemRenderer);NumberAxislocalNumberAxis=newNumberAxis(“RangeAxis“);localXYPlot.setRangeAxis(,localNumberAxis);XYDatasetlocalXYDataset=createDataset(“Series“,.D,newMinute(),);localXYPlot.setDataset(,localXYDataset);localXYPlot.mapDatasetToRangeAxis(,);StandardXYItemRendererlocalStandardXYItemRenderer=newStandardXYItemRenderer();localXYPlot.setRenderer(,localStandardXYItemRenderer);NumberAxislocalNumberAxis=newNumberAxis(“RangeAxis“);localXYPlot.setRangeAxis(,localNumberAxis);XYDatasetlocalXYDataset=createDataset(“Series“,.D,newMinute(),);localXYPlot.setDataset(,localXYDataset);localXYPlot.mapDatasetToRangeAxis(,);StandardXYItemRendererlocalStandardXYItemRenderer=newStandardXYItemRenderer();localXYPlot.setRenderer(,localStandardXYItemRenderer);ChartUtilities.applyCurrentTheme(localJFreeChart);localXYPlot.getRenderer().setSeriesPaint(,Color.black);localStandardXYItemRenderer.setSeriesPaint(,Color.red);localNumberAxis.setLabelPaint(Color.red);localNumberAxis.setTickLabelPaint(Color.red);localStandardXYItemRenderer.setSeriesPaint(,Color.blue);localNumberAxis.setLabelPaint(Color.blue);localNumberAxis.setTickLabelPaint(Color.blue);localStandardXYItemRenderer.setSeriesPaint(,Color.green);localNumberAxis.setLabelPaint(Color.green);localNumberAxis.setTickLabelPaint(Color.green);returnlocalJFreeChart;}privatestaticXYDatasetcreateDataset(StringparamString,doubleparamDouble,RegularTimePeriodparamRegularTimePeriod,intparamInt){TimeSerieslocalTimeSeries=newTimeSeries(paramString);RegularTimePeriodlocalRegularTimePeriod=paramRegularTimePeriod;doubled=paramDouble;for(inti=;i《paramInt;i++){localTimeSeries.add(localRegularTimePeriod,d);localRegularTimePeriod=localRegularTimePeriod.next();d*=(.D+(Math.random()-.D)/.D);}TimeSeriesCollectionlocalTimeSeriesCollection=newTimeSeriesCollection();localTimeSeriesCollection.addSeries(localTimeSeries);returnlocalTimeSeriesCollection;}publicstaticJPanelcreateDemoPanel(){JFreeChartlocalJFreeChart=createChart();ChartPanellocalChartPanel=newChartPanel(localJFreeChart);localChartPanel.setMouseWheelEnabled(true);returnlocalChartPanel;}publicstaticvoidmain(StringparamArrayOfString){MultipleAxisDemolocalMultipleAxisDemo=newMultipleAxisDemo(“JFreeChart:MultipleAxisDemo.java“);localMultipleAxisDemo.pack();RefineryUtilities.centerFrameOnScreen(localMultipleAxisDemo);localMultipleAxisDemo.setVisible(true);}}
诺基亚6700c怎么样苹果代手机图片(Píng果和苹果的手机壳一样的吗
苹果和苹果的手机壳一样的吗
因为iPhone和iPhone手机的Wài形Chǐ寸是不一致的,iPhone手机的外形尺寸为.X?.X?.mm;iPhone手机的外形尺寸为.X?.X2025年1月三星u108(诺基亚6700c怎么样)?.mm。
iPhoneHéiPhone的Qí他区别
三星u108的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于诺基亚6700c怎么样、三星u108的信息别忘了在本站进行查找喔。