本文整理汇总了Java中info.monitorenter.gui.chart.IAxis.AxisTitle类的典型用法代码示例。如果您正苦于以下问题:Java AxisTitle类的具体用法?Java AxisTitle怎么用?Java AxisTitle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AxisTitle类属于info.monitorenter.gui.chart.IAxis包,在下文中一共展示了AxisTitle类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: plot
import info.monitorenter.gui.chart.IAxis.AxisTitle; //导入依赖的package包/类
public static void plot (String title, String xlabel, String ylabel, double[] data) {
//////////////////////////////////
// Create a chart:
//////////////////////////////////
Chart2D chart = new Chart2D();
// Create an ITrace:
ITrace2D trace = new Trace2DSimple();
// Add the trace to the chart. This has to be done before adding points
chart.addTrace(trace);
// Add all points, as it is static:
for (int i = 0; i < data.length; i++) {
trace.addPoint(i, data[i]);
}
chart.getAxisX().setAxisTitle(new AxisTitle(xlabel));
chart.getAxisY().setAxisTitle(new AxisTitle(ylabel));
// Make it visible:
// Create a frame.
JFrame frame = new JFrame(title);
// add the chart to the frame:
frame.getContentPane().add(chart);
frame.setSize(Toolkit.getDefaultToolkit().getScreenSize().width, 400);
// Enable the termination button [cross on the upper right edge]:
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
frame.setVisible(true);
}
开发者ID:siemens,项目名称:industrialbenchmark,代码行数:35,代码来源:PlotCurve.java
示例2: ChartPanel
import info.monitorenter.gui.chart.IAxis.AxisTitle; //导入依赖的package包/类
public ChartPanel(String... params) {
super(new BorderLayout());
int historySize = 200;
chart = new Chart2D();
chart.setBorder(new EmptyBorder(0,0,0,0));
//chart.setSize(200,200);
chart.setUseAntialiasing(true);
chart.setBackground(Color.BLACK);
chart.setForeground(Color.WHITE);
chart.setGridColor(Color.darkGray);
for (IAxis left : chart.getAxesYLeft()) {
left.setAxisTitle(new AxisTitle(""));
left.setPaintGrid(true);
}
for (IAxis bottom : chart.getAxesXBottom()) {
bottom.setVisible(false);
}
for (String p : params) {
Trace2DLtd t = new Trace2DLtd(historySize, p);
t.setColor(Color.getHSBColor( ((float)(p.hashCode()%1024))/1024.0f, 0.5f, 1.0f));
chart.addTrace(t);
this.params.put(p, t);
}
add(chart, BorderLayout.CENTER);
}
开发者ID:automenta,项目名称:opennars,代码行数:33,代码来源:ChartPanel.java
示例3: initializeTraces
import info.monitorenter.gui.chart.IAxis.AxisTitle; //导入依赖的package包/类
private static void initializeTraces()
{
AxisLinear<IAxisScalePolicy> yAxisMs = new AxisLinear<IAxisScalePolicy>();
chart.setAxisYLeft(yAxisMs,0);
yAxisMs.setRangePolicy(new RangePolicyMinimumViewport(new Range(0.0,40.0)));
yAxisMs.setAxisTitle(new AxisTitle("ms"));
AxisLinear<IAxisScalePolicy> yAxisBytes = new AxisLinear<IAxisScalePolicy>();
chart.setAxisYRight(yAxisBytes,0);
yAxisBytes.setRangePolicy(new RangePolicyMinimumViewport(new Range(0.0,2000.0)));
yAxisBytes.setAxisTitle(new AxisTitle("bytes"));
// AxisLinear<IAxisScalePolicy> yAxisPackets = new AxisLinear<IAxisScalePolicy>();
// chart.addAxisYRight(yAxisPackets);
// yAxisPackets.setRangePolicy(new RangePolicyMinimumViewport(new Range(0.0,40.0)));
// yAxisPackets.setAxisTitle(new AxisTitle("packets"));
wasapiDeltaTrace = new TraceDescription(400, "Wasapi - Interarrival Time (ms)", Color.BLUE, chart.getAxisX(), yAxisMs);
wasapiBytesWrittenTrace = new TraceDescription(400, "Wasapi - Bytes Written", Color.RED, chart.getAxisX(), yAxisBytes);
jbSizeInPacketsTrace= new TraceDescription(400, "Jitter Buffer Size", Color.BLACK, chart.getAxisX(), yAxisMs);
jbCapacityInPacketsTrace= new TraceDescription(400, "Jitter Buffer Capacity", Color.DARK_GRAY, chart.getAxisX(), yAxisMs);
traces.clear();
traces.add(wasapiDeltaTrace);
traces.add(wasapiBytesWrittenTrace);
traces.add(jbSizeInPacketsTrace);
traces.add(jbCapacityInPacketsTrace);
for (TraceDescription aTrace : traces)
{
chart.addTrace(aTrace.trace, aTrace.xAxis, aTrace.yAxis);
}
initPerformed = true;
}
开发者ID:Metaswitch,项目名称:fmj,代码行数:36,代码来源:Charting.java
注:本文中的info.monitorenter.gui.chart.IAxis.AxisTitle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论