本文整理汇总了Java中de.erichseifert.gral.plots.areas.AreaRenderer类的典型用法代码示例。如果您正苦于以下问题:Java AreaRenderer类的具体用法?Java AreaRenderer怎么用?Java AreaRenderer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AreaRenderer类属于de.erichseifert.gral.plots.areas包,在下文中一共展示了AreaRenderer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setAreaRenderers
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的package包/类
/**
* Sets the {@code AreaRenderer}s for a certain data source to the specified
* value.
* @param s Data source.
* @param areaRendererFirst First {@code AreaRenderer} to be set.
* @param areaRenderers Remaining {@code AreaRenderer}s to be set.
*/
public void setAreaRenderers(DataSource s, AreaRenderer areaRendererFirst, AreaRenderer... areaRenderers) {
List<AreaRenderer> areaRendererList = null;
if (areaRendererFirst == null) {
setAreaRenderers(s, areaRendererList);
return;
}
areaRendererList = new ArrayList<>(areaRenderers.length + 1);
areaRendererList.add(areaRendererFirst);
for (AreaRenderer areaRenderer : areaRenderers) {
if (areaRenderer == null) {
throw new IllegalArgumentException("An AreaRenderer for a DataSource cannot be null.");
}
areaRendererList.add(areaRenderer);
}
setAreaRenderers(s, areaRendererList);
}
开发者ID:eseifert,项目名称:gral,代码行数:24,代码来源:XYPlot.java
示例2: add
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的package包/类
@Override
public void add(int index, DataSource source, boolean visible) {
super.add(index, source, visible);
// Set axis mapping
setMapping(source, AXIS_X, AXIS_Y);
// The mapping from columns to axes has changed, so scaling has to be
// refreshed
autoscaleAxes();
// Assign default renderers
PointRenderer pointRendererDefault = new DefaultPointRenderer2D();
LineRenderer lineRendererDefault = null;
AreaRenderer areaRendererDefault = null;
// FIXME: Overwrites possible present point and line renderers
setPointRenderers(source, pointRendererDefault);
setLineRenderers(source, lineRendererDefault);
setAreaRenderers(source, areaRendererDefault);
}
开发者ID:eseifert,项目名称:gral,代码行数:20,代码来源:XYPlot.java
示例3: formatFilledArea
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的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);
}
开发者ID:Arnauld,项目名称:cucumber-contrib,代码行数:19,代码来源:AreaPlot.java
示例4: XYPlot
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的package包/类
/**
* Initializes a new instance object with the specified data sources and
* reasonable default settings.
* @param data Data to be displayed.
*/
public XYPlot(DataSource... data) {
super();
pointRenderers = new HashMap<DataSource, PointRenderer>(data.length);
lineRenderers = new HashMap<DataSource, LineRenderer>(data.length);
areaRenderers = new HashMap<DataSource, AreaRenderer>(data.length);
setPlotArea(new XYPlotArea2D(this));
setLegend(new XYLegend(this));
// Handle data sources after the renderer lists are initialized
for (DataSource source : data) {
add(source);
}
createDefaultAxes();
autoscaleAxes();
createDefaultAxisRenderers();
// Listen for changes of the axis range
for (String axisName : getAxesNames()) {
getAxis(axisName).addAxisListener(this);
}
}
开发者ID:charles-cooper,项目名称:idylfin,代码行数:30,代码来源:XYPlot.java
示例5: formatFilledArea
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的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);
}
开发者ID:PacktPublishing,项目名称:Java-Data-Science-Cookbook,代码行数:14,代码来源:AreaPlot.java
示例6: formatLineArea
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的package包/类
private static void formatLineArea(XYPlot plot, DataSource data, Color color) {
PointRenderer point = new DefaultPointRenderer2D();
point.setColor(color);
plot.setPointRenderer(data, point);
plot.setLineRenderer(data, null);
AreaRenderer area = new LineAreaRenderer2D();
area.setGap(3.0);
area.setColor(color);
plot.setAreaRenderer(data, area);
}
开发者ID:PacktPublishing,项目名称:Java-Data-Science-Cookbook,代码行数:11,代码来源:AreaPlot.java
示例7: getAreaRenderers
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的package包/类
/**
* Returns all {@code AreaRenderer}s for the specified data source.
* @param s Data source.
* @return {@code AreaRenderer}s used to render the {@code DataSource}.
*/
public List<AreaRenderer> getAreaRenderers(DataSource s) {
List<AreaRenderer> areaRenderers = areaRenderersByDataSource.get(s);
if (areaRenderers != null) {
return Collections.unmodifiableList(areaRenderers);
}
return Collections.emptyList();
}
开发者ID:eseifert,项目名称:gral,代码行数:13,代码来源:XYPlot.java
示例8: add
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的package包/类
@Override
public void add(int index, DataSource source, boolean visible) {
super.add(index, source, visible);
// Assign default renderers
PointRenderer pointRendererDefault = new BarRenderer(this);
LineRenderer lineRendererDefault = null;
AreaRenderer areaRendererDefault = null;
// FIXME: Overwrites possible present point and line renderers
setPointRenderers(source, pointRendererDefault);
setLineRenderers(source, lineRendererDefault);
setAreaRenderers(source, areaRendererDefault);
}
开发者ID:eseifert,项目名称:gral,代码行数:14,代码来源:BarPlot.java
示例9: testGetAreaRenderers
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的package包/类
@Test
public void testGetAreaRenderers() {
DataSource data = new DummyData(2, 1, 1.0);
MockXYPlot plot = new MockXYPlot(data);
AreaRenderer renderer = new DefaultAreaRenderer2D();
plot.setAreaRenderers(data, renderer);
assertNotNull(plot.getAreaRenderers(new DummyData(4, 2, 0.0)));
assertNotNull(plot.getAreaRenderers(null));
List<AreaRenderer> renderers = plot.getAreaRenderers(data);
assertTrue(renderers.contains(renderer));
assertEquals(renderers.size(), 1);
}
开发者ID:eseifert,项目名称:gral,代码行数:14,代码来源:XYPlotTest.java
示例10: testSetAreaRenderers
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的package包/类
@Test
public void testSetAreaRenderers() {
DataSource data = new DummyData(2, 1, 1.0);
MockXYPlot plot = new MockXYPlot();
AreaRenderer renderer1 = new DefaultAreaRenderer2D();
AreaRenderer renderer2 = new DefaultAreaRenderer2D();
plot.setAreaRenderers(data, Arrays.asList(renderer1, renderer2));
List<AreaRenderer> renderers = plot.getAreaRenderers(data);
assertTrue(renderers.contains(renderer1));
assertTrue(renderers.contains(renderer2));
assertEquals(renderers.size(), 2);
}
开发者ID:eseifert,项目名称:gral,代码行数:14,代码来源:XYPlotTest.java
示例11: formatFilledArea
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的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);
}
开发者ID:eseifert,项目名称:gral,代码行数:14,代码来源:AreaPlot.java
示例12: formatLineArea
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的package包/类
private static void formatLineArea(XYPlot plot, DataSource data, Color color) {
PointRenderer point = new DefaultPointRenderer2D();
point.setColor(color);
plot.setPointRenderers(data, point);
plot.setLineRenderers(data, null);
AreaRenderer area = new LineAreaRenderer2D();
area.setGap(3.0);
area.setColor(color);
plot.setAreaRenderers(data, area);
}
开发者ID:eseifert,项目名称:gral,代码行数:11,代码来源:AreaPlot.java
示例13: formatFilledArea
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的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);
}
开发者ID:Drusy,项目名称:freebox-v6-monitor,代码行数:11,代码来源:ChartPanel.java
示例14: formatLineArea
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的package包/类
private static void formatLineArea(XYPlot plot, DataSource data, Color color) {
PointRenderer point = new DefaultPointRenderer2D();
point.setColor(color);
plot.setPointRenderer(data, point);
plot.setLineRenderer(data, null);
AreaRenderer area = new LineAreaRenderer2D();
area.setGap(3.0);
area.setColor(color);
plot.setAreaRenderer(data, area);
}
开发者ID:Arnauld,项目名称:cucumber-contrib,代码行数:12,代码来源:AreaPlot.java
示例15: add
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的package包/类
@Override
public void add(int index, DataSource source, boolean visible) {
super.add(index, source, visible);
// Set axis mapping
setMapping(source, AXIS_X, AXIS_Y);
// Assign default renderers
PointRenderer pointRendererDefault = new DefaultPointRenderer2D();
LineRenderer lineRendererDefault = null;
AreaRenderer areaRendererDefault = null;
setPointRenderer(source, pointRendererDefault);
setLineRenderer(source, lineRendererDefault);
setAreaRenderer(source, areaRendererDefault);
}
开发者ID:charles-cooper,项目名称:idylfin,代码行数:16,代码来源:XYPlot.java
示例16: add
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的package包/类
@Override
public void add(int index, DataSource source, boolean visible) {
super.add(index, source, visible);
// Assign default renderers
PointRenderer pointRendererDefault = new BarRenderer(this);
LineRenderer lineRendererDefault = null;
AreaRenderer areaRendererDefault = null;
setPointRenderer(source, pointRendererDefault);
setLineRenderer(source, lineRendererDefault);
setAreaRenderer(source, areaRendererDefault);
}
开发者ID:charles-cooper,项目名称:idylfin,代码行数:13,代码来源:BarPlot.java
示例17: formatFilledArea
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的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);
}
开发者ID:fjug,项目名称:IDDEA,代码行数:14,代码来源:HistogramPlot.java
示例18: StackedPlots
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的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);
}
开发者ID:eseifert,项目名称:gral,代码行数:46,代码来源:StackedPlots.java
示例19: StackedPlots
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的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);
}
开发者ID:arahusky,项目名称:performance_javadoc,代码行数:46,代码来源:StackedPlots.java
示例20: getAreaRenderer
import de.erichseifert.gral.plots.areas.AreaRenderer; //导入依赖的package包/类
/**
* Returns the {@code AreaRenderer} for the specified data source.
* @param s Data source.
* @return {@code AreaRenderer}.
*/
public AreaRenderer getAreaRenderer(DataSource s) {
return areaRenderers.get(s);
}
开发者ID:charles-cooper,项目名称:idylfin,代码行数:9,代码来源:XYPlot.java
注:本文中的de.erichseifert.gral.plots.areas.AreaRenderer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论