Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
有许多绘图包(GNUPlot、XFig、MATLAB、Excel 等),每个都有自己的优点和缺点。
但是,如果您可以访问 MATLAB 并且对结果感到满意,为什么不简单地将程序中的数据输出到 .csv 文件并将其加载到 MATLAB 中呢?然后您可以使用 MATLAB 绘制它,而无需实现 .mex 文件的麻烦。
There are many plotting packages out there (GNUPlot, XFig, MATLAB, Excel, and so on) each with their own strengths and weaknesses.
But if you have access to MATLAB and are happy with the results why not simply output the data from your program to a .csv file and load it into MATLAB? Then you can plot it using MATLAB without the hassle of implementing .mex files.
对于此任务,可以使用任意数量的绘图实用程序,例如 gnuplot、R 等等。我认为您会想要使用一个非常轻量级的导出例程来尽可能简单地以 csv 文件格式导出数据。然后您可以创建脚本来使用任何实用程序绘制数据。
就我个人而言,我不会为此使用 matlab。您只想在获得数据后尽快创建绘图,而启动 matlab 并在其中运行脚本将比运行 gnuplot 脚本花费更长的时间。但是,如果您还想对数据运行过滤器和数学表达式,那么 matlab 就很棒(以及 octave< /a> 当然!)
所以你的问题没有真正的答案,除非你让我们对你想要绘制的内容有更多的了解。有无数的绘图工具能够绘制基本的东西。
For this task any number of plotting utilities like gnuplot, R and a lot more. I think you would want to use a very light weight export routine to export your data as simple as possible in a csv file format for example. Then you could create script to plot the data with any utility.
Personally, I wouldn't use matlab for that. You simply want to create a plot as quickly as possible once you have the data, and powering up matlab and run a script in there would take a lot longer than running a gnuplot script for example. However, if you also want to run filters and mathematical expressions on your data, matlab is great (along with octave of course!)
So there is no real answer to your question, unless you give us a little more insight into what you want to plot. There is in infinite number of plotting tools that is capable to plot the basic stuff.
如果您了解并喜欢R,那么RInside 可以轻松地将 R 嵌入到您的 C++ 应用程序中(至少对于测试版本,您不希望在嵌入式使用中使用它)。
RInside 附带的许多示例中有一些绘制给定函数和/或数据的示例。我基本上是为同一个测试用例编写的。我的博客有一篇简短的文章,将其嵌入Qt。
If you know and like R, then RInside makes it easy to embed R inside your C++ application (at least for the test builds, you would not want that in embedded use).
Among the many example shipping with RInside are some that plot given functions and/or data. I essentially wrote it for the same test case. My blog has a short write-up on embedding this in Qt.
PLplot。
PLplot.
R 具有出色的绘图功能,您可以使用 RInside 将 R 代码嵌入到 C++ 应用程序中。
正如其他人所提到的,这可能是将您的绘图代码与您的应用程序完全分离。如果您的要求只是绘图工具可以读取充满数据的文本文件并以编程方式绘制散点图或直方图,那么 MATLAB 或许多其他工具将轻松满足您的要求。
R has fantastic plotting capabilities, and you can use RInside to embed R code in a C++ application.
As others have mentioned, it may be be to separate your plotting code from your application completely. If your requirement is simply that the plotting tool can read a text file full of data and draw a scatterplot or histogram programmatically, then MATLAB or a host of other tools will easily fit the bill.