jjzjj

ios - CPTScatterPlotInterpolationCurved 类型无法正常工作

coder 2024-01-25 原文

我正在使用 Coreplot 框架来创建折线图,

 CPTScatterPlot *plot = [[CPTScatterPlot alloc] init];
 plot.dataSource = self;
 plot.identifier = @"mainplot";
 plot.dataLineStyle = lineStyle_;
 plot.plotSymbol = plotSymbol;
 plot.interpolation = CPTScatterPlotInterpolationCurved;
 [self.graph addPlot:plot];

如果我使用 CPTScatterPlotInterpolationLinear 点在图中正确连接但是 CPTScatterPlotInterpolationCurved 点在图中设置不正确

1.使用CPTScatterPlotInterpolationLinear

2.使用CPTScatterPlotInterpolationCurved

顶部点工作正常,只有底部点设置不正确,请参见点 { (2,0),(3,0)},如何解决此问题?

最佳答案

这是按设计工作的。目标是获得一条通过所有数据点的平滑曲线,方向的突然变化尽可能少。

如果您有关于如何改进它的建议,请在 Core Plot 上打开增强请求 issue tracker .

关于ios - CPTScatterPlotInterpolationCurved 类型无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19852898/

有关ios - CPTScatterPlotInterpolationCurved 类型无法正常工作的更多相关文章

随机推荐