我使用AChartEngine生成散点图。我目前正在使用XYMultipleSeriesRenderer在单个图表视图中渲染两个散点图。如何为每个散点图设置不同的点大小
final XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
.
.
renderer.setPointSize(5.5f); // this changes point size for all scatter charts
// Scatter chart1
XYSeriesRenderer r1 = new XYSeriesRenderer();
r1.setColor(Color.BLACK);
r1.setPointStyle(PointStyle.CIRCLE);
r1.setFillPoints(true);
renderer.addSeriesRenderer(r1);
// Scatter chart2
XYSeriesRenderer r2 = new XYSeriesRenderer();
r2.setColor(Color.YELLOW);
r2.setPointStyle(PointStyle.CIRCLE);
r2.setFillPoints(true);
renderer.addSeriesRenderer(r2);
我希望两个散点图的点数都有不同的半径。任何帮助将不胜感激。谢谢
答案 0 :(得分:5)
您可以使用
mRenderer.setPointSize(20);
,其中
private XYMultipleSeriesRenderer mRenderer = new XYMultipleSeriesRenderer();