本文整理汇总了Java中de.erichseifert.gral.plots.lines.LineRenderer.setGap方法的典型用法代码示例。如果您正苦于以下问题:Java LineRenderer.setGap方法的具体用法?Java LineRenderer.setGap怎么用?Java LineRenderer.setGap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.erichseifert.gral.plots.lines.LineRenderer
的用法示例。
在下文中一共展示了LineRenderer.setGap方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: formatFilledArea
import de.erichseifert.gral.plots.lines.LineRenderer; //导入方法依赖的package包/类
private static void formatFilledArea(XYPlot plot, DataSource data, Color color) {
PointRenderer point = new DefaultPointRenderer2D();
point.setShape(new Ellipse2D.Double(-3,-3,6,6));
point.setColor(color);
plot.setPointRenderer(data, point);
LineRenderer line = new DefaultLineRenderer2D();
line.setColor(color);
float[] DOT_DOT = {4.0f, 4.0f};
line.setStroke(new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.f, DOT_DOT, 0.f));
line.setGap(3.0);
line.setGapRounded(true);
plot.setLineRenderer(data, line);
AreaRenderer area = new DefaultAreaRenderer2D();
area.setColor(GraphicsUtils.deriveWithAlpha(color, 64));
plot.setAreaRenderer(data, area);
}
示例2: formatFilledArea
import de.erichseifert.gral.plots.lines.LineRenderer; //导入方法依赖的package包/类
private static void formatFilledArea(XYPlot plot, DataSource data, Color color) {
PointRenderer point = new DefaultPointRenderer2D();
point.setColor(color);
plot.setPointRenderer(data, point);
LineRenderer line = new DefaultLineRenderer2D();
line.setColor(color);
line.setGap(3.0);
line.setGapRounded(true);
plot.setLineRenderer(data, line);
AreaRenderer area = new DefaultAreaRenderer2D();
area.setColor(GraphicsUtils.deriveWithAlpha(color, 64));
plot.setAreaRenderer(data, area);
}
示例3: formatFilledArea
import de.erichseifert.gral.plots.lines.LineRenderer; //导入方法依赖的package包/类
private static void formatFilledArea(XYPlot plot, DataSource data, Color color) {
PointRenderer point = new DefaultPointRenderer2D();
point.setColor(color);
plot.setPointRenderers(data, point);
LineRenderer line = new DefaultLineRenderer2D();
line.setColor(color);
line.setGap(3.0);
line.setGapRounded(true);
plot.setLineRenderers(data, line);
AreaRenderer area = new DefaultAreaRenderer2D();
area.setColor(GraphicsUtils.deriveWithAlpha(color, 64));
plot.setAreaRenderers(data, area);
}
示例4: MultiplePointRenderers
import de.erichseifert.gral.plots.lines.LineRenderer; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public MultiplePointRenderers() {
// Generate data
DataTable data = new DataTable(Double.class, Double.class);
for (double x = 1.0; x <= 20.0; x += 1.0) {
data.add(x, x*x);
}
// Create new xy-plot
XYPlot plot = new XYPlot(data);
// Format plot
plot.setInsets(new Insets2D.Double(20.0, 60.0, 40.0, 40.0));
plot.setBackground(Color.WHITE);
plot.getTitle().setText(getDescription());
// Format rendering of data points
PointRenderer defaultPointRenderer = new DefaultPointRenderer2D();
defaultPointRenderer.setColor(GraphicsUtils.deriveDarker(COLOR1));
plot.setPointRenderers(data, defaultPointRenderer);
PointRenderer shadowRenderer = new ShadowPointRenderer(defaultPointRenderer);
plot.addPointRenderer(data, shadowRenderer);
LineRenderer lineRenderer = new DefaultLineRenderer2D();
lineRenderer.setGap(2.0);
plot.setLineRenderers(data, lineRenderer);
// Add plot to Swing component
add(new InteractivePanel(plot), BorderLayout.CENTER);
}
示例5: formatFilledArea
import de.erichseifert.gral.plots.lines.LineRenderer; //导入方法依赖的package包/类
private void formatFilledArea(XYPlot plot, DataSource data, Color color) {
LineRenderer line = new DefaultLineRenderer2D();
line.setColor(color);
line.setGap(3.0);
line.setGapRounded(true);
plot.setLineRenderer(data, line);
AreaRenderer area = new DefaultAreaRenderer2D();
area.setColor(GraphicsUtils.deriveWithAlpha(color, 64));
plot.setAreaRenderer(data, area);
}
示例6: formatFilledArea
import de.erichseifert.gral.plots.lines.LineRenderer; //导入方法依赖的package包/类
private static void formatFilledArea(XYPlot plot, DataSource data, Color color) {
plot.setPointRenderer(data, null);
LineRenderer line = new DefaultLineRenderer2D();
line.setColor(color);
line.setGap(3.0);
line.setGapRounded(true);
plot.setLineRenderer(data, line);
AreaRenderer area = new DefaultAreaRenderer2D();
area.setColor(GraphicsUtils.deriveWithAlpha(color, 64));
plot.setAreaRenderer(data, area);
}
示例7: StackedPlots
import de.erichseifert.gral.plots.lines.LineRenderer; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public StackedPlots() {
// Generate data
DataTable data = new DataTable(Double.class, Double.class);
double x=0.0, y=0.0;
for (x=0.0; x<100.0; x+=2.0) {
y += 10.0*random.nextGaussian();
data.add(x, Math.abs(y));
}
// Create and format upper plot
XYPlot plotUpper = new XYPlot(data);
Color colorUpper = COLOR1;
plotUpper.setPointRenderers(data, null);
LineRenderer lineUpper = new DefaultLineRenderer2D();
lineUpper.setColor(colorUpper);
plotUpper.setLineRenderers(data, lineUpper);
AreaRenderer areaUpper = new DefaultAreaRenderer2D();
areaUpper.setColor(GraphicsUtils.deriveWithAlpha(colorUpper, 64));
plotUpper.setAreaRenderers(data, areaUpper);
plotUpper.setInsets(new Insets2D.Double(20.0, 50.0, 40.0, 20.0));
// Create and format lower plot
XYPlot plotLower = new XYPlot(data);
Color colorLower = COLOR1;
PointRenderer pointsLower = plotLower.getPointRenderers(data).get(0);
pointsLower.setColor(colorLower);
pointsLower.setShape(new Ellipse2D.Double(-3, -3, 6, 6));
LineRenderer lineLower = new DefaultLineRenderer2D();
lineLower.setStroke(new BasicStroke(2f));
lineLower.setGap(1.0);
lineLower.setColor(colorLower);
plotLower.setLineRenderers(data, lineLower);
plotLower.setInsets(new Insets2D.Double(20.0, 50.0, 40.0, 20.0));
DrawableContainer plots = new DrawableContainer(new TableLayout(1));
plots.add(plotUpper);
plots.add(plotLower);
// Connect the two plots, i.e. user (mouse) actions affect both plots
plotUpper.getNavigator().connect(plotLower.getNavigator());
InteractivePanel panel = new InteractivePanel(plots);
add(panel);
}
示例8: StackedPlots
import de.erichseifert.gral.plots.lines.LineRenderer; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public StackedPlots() {
// Generate data
DataTable data = new DataTable(Double.class, Double.class);
double x=0.0, y=0.0;
for (x=0.0; x<100.0; x+=2.0) {
y += 10.0*random.nextGaussian();
data.add(x, Math.abs(y));
}
// Create and format upper plot
XYPlot plotUpper = new XYPlot(data);
Color colorUpper = COLOR1;
plotUpper.setPointRenderer(data, null);
LineRenderer lineUpper = new DefaultLineRenderer2D();
lineUpper.setColor(colorUpper);
plotUpper.setLineRenderer(data, lineUpper);
AreaRenderer areaUpper = new DefaultAreaRenderer2D();
areaUpper.setColor(GraphicsUtils.deriveWithAlpha(colorUpper, 64));
plotUpper.setAreaRenderer(data, areaUpper);
plotUpper.setInsets(new Insets2D.Double(20.0, 50.0, 40.0, 20.0));
// Create and format lower plot
XYPlot plotLower = new XYPlot(data);
Color colorLower = COLOR1;
PointRenderer pointsLower = plotLower.getPointRenderer(data);
pointsLower.setColor(colorLower);
pointsLower.setShape(new Ellipse2D.Double(-3, -3, 6, 6));
LineRenderer lineLower = new DefaultLineRenderer2D();
lineLower.setStroke(new BasicStroke(2f));
lineLower.setGap(1.0);
lineLower.setColor(colorLower);
plotLower.setLineRenderer(data, lineLower);
plotLower.setInsets(new Insets2D.Double(20.0, 50.0, 40.0, 20.0));
DrawableContainer plots = new DrawableContainer(new TableLayout(1));
plots.add(plotUpper);
plots.add(plotLower);
// Connect the two plots, i.e. user (mouse) actions affect both plots
plotUpper.getNavigator().connect(plotLower.getNavigator());
InteractivePanel panel = new InteractivePanel(plots);
add(panel);
}