绘制我的 c++ 的中间结果的最佳工具是什么?代码?

发布于 2024-11-27 17:11:52 字数 1536 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

和我恋爱吧 2024-12-04 17:11:53

有许多绘图包(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.

你在我安 2024-12-04 17:11:53

对于此任务,可以使用任意数量的绘图实用程序,例如 gnuplotR 等等。我认为您会想要使用一个非常轻量级的导出例程来尽可能简单地以 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.

我的鱼塘能养鲲 2024-12-04 17:11:53

如果您了解并喜欢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.

川水往事 2024-12-04 17:11:53

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文