[c++] Is there any 'out-of-the-box' 2D/3D plotting library for C++?

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".

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...

wxMathPlot: Very new, not mature, few features (still active?)

libgraph: Outdated, not rebust, 2D only and outputs images only.

koolplot: Too basic, no control over the created window.

EasyBMP: Very basic, only images output.

plotutils: Command line only.

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.

Any comments? Ideas?

Thanks!

This question is related to c++ graph wxwidgets plot

The answer is


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 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 found the game library Allegro easy to use back in the day. Might be worth a look.


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

u can use DISLIN

it is quite neat!


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.


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

u can use DISLIN

it is quite neat!


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.


We use an ancient version of ComponentOne Chart.


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


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


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.


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.


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


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.


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


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 found the game library Allegro easy to use back in the day. Might be worth a look.


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


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


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


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.


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.


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

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


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


We use an ancient version of ComponentOne Chart.


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 :)


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...).


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


We use an ancient version of ComponentOne Chart.


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


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 :)


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

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


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...).


We use an ancient version of ComponentOne Chart.


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...).


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


Examples related to c++

Method Call Chaining; returning a pointer vs a reference? How can I tell if an algorithm is efficient? Difference between opening a file in binary vs text How can compare-and-swap be used for a wait-free mutual exclusion for any shared data structure? Install Qt on Ubuntu #include errors detected in vscode Cannot open include file: 'stdio.h' - Visual Studio Community 2017 - C++ Error How to fix the error "Windows SDK version 8.1" was not found? Visual Studio 2017 errors on standard headers How do I check if a Key is pressed on C++

Examples related to graph

How to plot multiple functions on the same figure, in Matplotlib? Python equivalent to 'hold on' in Matlab How to combine 2 plots (ggplot) into one plot? how to draw directed graphs using networkx in python? What is the difference between dynamic programming and greedy approach? Plotting using a CSV file Python equivalent of D3.js Count number of times a date occurs and make a graph out of it How do I create a chart with multiple series using different X values for each series? Rotating x axis labels in R for barplot

Examples related to wxwidgets

Python ImportError: No module named wx Is there any 'out-of-the-box' 2D/3D plotting library for C++?

Examples related to plot

Fine control over the font size in Seaborn plots for academic papers Why do many examples use `fig, ax = plt.subplots()` in Matplotlib/pyplot/python Modify the legend of pandas bar plot Format y axis as percent Simple line plots using seaborn Plot bar graph from Pandas DataFrame Plotting multiple lines, in different colors, with pandas dataframe Plotting in a non-blocking way with Matplotlib What does the error "arguments imply differing number of rows: x, y" mean? matplotlib get ylim values