Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发如下所示的面积图并面临以下问题。
曲线形状看起来不合适,我需要平滑的曲线。
X 轴值是动态的,它可能以 40 或可能是 60 或任何其他值开始。如何计算?
任何帮助将不胜感激。
要使线条更平滑,请为其提供更多数据点或绘制曲线图。
plot.interpolation = CPTScatterPlotInterpolationCurved;
如果知道数据值的范围,xRange直接设置即可。请记住将位置设置为min值并将长度设置为(max - min)。您还可以让图形为您缩放绘图空间。
xRange
min
(max - min)
[plotSpace scaleToFitPlots:[graph allPlots]];