CorePlot; How to skip data when using doubleForPlot instead of numberForPlot

╄→尐↘猪︶ㄣ 提交于 2019-12-11 23:26:37

问题


I have a CPTScatterPlot with a huge amount of data. I have found that I could reduce the memory overhead (and thus time) by using doubleForPlot instead of numberForPlot in CorePlot.

But when using numberForPlot I have the option to return nil if some data are missing. CorePlot will then make a break in the graph and not connect the neighbor points.

Is the same possible when using doubleForPlot? Is there some exceptional value that I can return and the CorePlot will treat this as a missing point?

Thanks Eric! ;)


回答1:


Return NAN for missing values.




回答2:


Did you try an empty c array? Theoretically should work.

  • @return A retained C array of data points.

-(double *)doublesForPlot:(CPTPlot *)plot field:(NSUInteger)fieldEnum recordIndexRange:(NSRange)indexRange;



来源:https://stackoverflow.com/questions/19684234/coreplot-how-to-skip-data-when-using-doubleforplot-instead-of-numberforplot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!