使用 xCode 制作图表
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1084632/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
making graphs with xCode
提问by yan bellavance
Hi I need to graph some arrays to analyse signals, I have a cocoa project going. Can anyone tell me where I can find tools to simplify this task?
嗨,我需要绘制一些数组来分析信号,我有一个可可项目正在进行中。谁能告诉我在哪里可以找到简化此任务的工具?
Basically i want to display my arrays like on a graphing calculator.
基本上我想像在图形计算器上一样显示我的数组。
回答by Brad Larson
Even though it's a young library, I'd suggest looking at the open source Core Plot framework. It works on Mac and iPhone and can currently plot line and bar charts. As I said, it's young and a lot of the core functionality is still being written, but it might work right now for your case.
即使它是一个年轻的库,我还是建议查看开源Core Plot 框架。它适用于 Mac 和 iPhone,目前可以绘制折线图和条形图。正如我所说,它很年轻,许多核心功能仍在编写中,但它现在可能适用于您的情况。
回答by alanlcode
Take a look at this post to the Apple mailing lists. http://lists.apple.com/archives/scitech/2007/Jun/msg00022.html
看看这篇文章到 Apple 邮件列表。http://lists.apple.com/archives/scitech/2007/Jun/msg00022.html
It mentions 3 potential graphing packages that you can try. I have not had personal experience with them, so buyer beware, but it will at least give you a start on where to look.
它提到了 3 个您可以尝试的潜在图形包。我没有亲身体验过它们,所以买家要当心,但它至少会让你开始去哪里看。
回答by Ben Gotow
XCode allows you to create data formatters to present object data in the debugger, but it doesn't provide any way to graphically represent the data using charts or graphs. (At least, not that I know of!) I think that's beyond the scope of XCode. You might consider dumping the data from your array to a file using a bit of code or the console, and then loading it into Excel or MATLAB. Then you can create a graph of your signal with no problem.
XCode 允许您创建数据格式化程序以在调试器中显示对象数据,但它不提供任何使用图表或图形以图形方式表示数据的方法。(至少,我不知道!)我认为这超出了 XCode 的范围。您可能会考虑使用一些代码或控制台将数组中的数据转储到文件中,然后将其加载到 Excel 或 MATLAB 中。然后,您可以毫无问题地创建信号图。
Just out of curiosity, are you familiar with another IDE that provides graphs of array data? I know tools like MATLAB and Mathematica do it pretty nicely, but I've never seen it in an IDE.
出于好奇,您是否熟悉另一个提供数组数据图形的 IDE?我知道 MATLAB 和 Mathematica 之类的工具做得很好,但我从未在 IDE 中见过它。