OGeek|极客世界-中国程序员成长平台

标题: ios - CPTScatterPlotInterpolationCurved 类型无法正常工作 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 16:15
标题: ios - CPTScatterPlotInterpolationCurved 类型无法正常工作

我正在使用 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 CPTScatterPlotInterpolationLinear

2.使用 CPTScatterPlotInterpolationCurved enter image description here

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



Best Answer-推荐答案


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

如果您对如何改进它有任何建议,请在 Core Plot issue tracker 上提出改进请求.

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






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4