是否有开箱即用的 C + + 2D/3D 绘图库?

我研究了在交互式窗口中绘制函数(或其他类型的图形)的不同选项。我大多数时候使用 wxWidgets,但是我也可以使用其他的“接口”。

看看现在有什么可用的,下面是我发现的 :

WxPlot : 自2006年以来没有更新。但是如果它是..。

WxMathPlot : 非常新,不成熟,功能很少(仍然活跃?)

Libgraph : 过时的,不重复,只有2D 和输出图像。

Koolplot : 太基本,无法控制创建的窗口。

EasyBMP : 非常基本,只输出图像。

Plotutils : 仅命令行。

Plplot : 几乎没有维护 C 和 C + + API。事实上 wxPlot 正是基于这一点。也可能是一个可能的候选人,如果 C 和 C + + 接口,我们更新。

有什么想法吗?

谢谢!

118294 次浏览

Might wxChart be an option? I have not used it myself however and it looks like it hasnt been updated for a while.

Just an idea: Use Python as embeddable scripting language to plot your graphs. Python has a plethora of plotting libraries.

OpenGL. It WILL be hard and possibly rewriting the wheel, though. Keep in mind that OpenGL is a general 3D library, and not a specific plot library, but you can implement plotting based on it.

I found the game library Allegro easy to use back in the day. Might be worth a look.

We use an ancient version of ComponentOne Chart.

AntiGrain Geometry (AGG). http://www.antigrain.com/. Its an opensource 2D vector graphics library. Its a standalone library with no additional dependencies. Has good documentation. Python plotting library matplotlib uses AGG as one of backends.

Have a look at wxArt2d it is a complete framework for 2d editing and plotting. See the screenshots for more examples.

Some interesting features:

  • Reading and writing SVG and CVG
  • Several views of the same document
  • Changes are updated when idle
  • Optimized drawing of 2d objects

Hey! I'm the developer of wxMathPlot! The project is active: I just took a long time to get a new release, because the code needed a partial rewriting to introduce new features. Take a look to the new 0.1.0 release: it is a great improvement from old versions. Anyway, it doesn't provide 3D (even if I always thinking about it...).

I programmatically provide required input files to GNUPlot executable 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 :)

I'm all about ROOT for these needs. Pretty heavy if you don't need all the analysis support, though.

MathGL have many plot types, C/Fortran interface and basic data analysis

You have Qwt which is mature. There is a 3D version lurking somewhere. However, I have never been satisfied with the aesthetic result.

It may be worth waiting for Qt3D to come out to write something better yourself easily.

u can use DISLIN

it is quite neat!

Even though this thread is old but gold. QCustomPlot is very recommendable as well to complement this list.