是否有任何“开箱即用”的 C++ 2D/3D 绘图库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/296199/
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
Is there any 'out-of-the-box' 2D/3D plotting library for C++?
提问by user38290
I looked at the different options for plotting functions (or other types of graphs) in an interactive window. I mostly use wxWidgets but I'd be open to any other "interfaces".
我查看了在交互式窗口中绘制函数(或其他类型的图形)的不同选项。我主要使用 wxWidgets,但我对任何其他“接口”持开放态度。
Looking at what is available, here is what I've found:
查看可用的内容,这是我发现的内容:
wxPlot: Not updated since 2006. But it would be a good candidate if it was...
wxPlot:自 2006 年以来未更新。但如果它是...
wxMathPlot: Very new, not mature, few features (still active?)
wxMathPlot:非常新,不成熟,功能很少(仍然活跃?)
libgraph: Outdated, not rebust, 2D only and outputs images only.
libgraph: 过时的,不是反驳的,只有 2D 并且只输出图像。
koolplot: Too basic, no control over the created window.
koolplot:太基本了,无法控制创建的窗口。
EasyBMP: Very basic, only images output.
EasyBMP:非常基本,只输出图像。
plotutils: Command line only.
plotutils:仅限命令行。
plplot: C and C++ API are barely maintained. It is in fact on this that wxPlot is based. Could be a could candidate also if C and C++ interface we're updated.
plplot:C 和 C++ API 几乎没有维护。事实上,wxPlot 正是基于此。如果我们更新了 C 和 C++ 接口,也可能是候选对象。
Any comments? Ideas?
任何意见?想法?
Thanks!
谢谢!
回答by TheMindWithin
Even though this thread is old but gold. QCustomPlotis very recommendable as well to complement this list.
尽管这条线很旧但很金。QCustomPlot也是非常值得推荐的,以补充这个列表。
回答by abalakin
回答by Alexandre C.
回答by dmckee --- ex-moderator kitten
回答by Gant
I programmatically provide required input files to GNUPlotexecutable and invoke it using system()
function. It is suitable to my situation since I only want to visualize my data during research. But if you want the plotting functionality integrated into your executable file, maybe this is not for you :)
我以编程方式向GNUPlot可执行文件提供所需的输入文件并使用system()
函数调用它。它适合我的情况,因为我只想在研究期间可视化我的数据。但是,如果您希望将绘图功能集成到您的可执行文件中,那么这可能不适合您:)
回答by SteveL
回答by jfs
Just an idea: Use Python as embeddable scripting language to plot your graphs. Python has a plethora of plotting libraries.
只是一个想法:使用 Python 作为可嵌入的脚本语言来绘制图形。Python 有大量的绘图库。
回答by Kev
I found the game library Allegro easy to use back in the day. Might be worth a look.
我发现游戏库 Allegro 在过去很容易使用。可能值得一看。
回答by John Dibling
We use an ancient version of ComponentOne Chart.
我们使用旧版本的ComponentOne Chart。