76

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!

user38290
  • 761
  • 1
  • 6
  • 3

14 Answers14

27

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

Sharky Bamboozle
  • 1,066
  • 16
  • 28
15

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

abalakin
  • 825
  • 7
  • 6
10

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

dmckee --- ex-moderator kitten
  • 98,632
  • 24
  • 142
  • 234
  • I know this is an old comment, but thank you for pointing out ROOT. I hadn't heard about it and it will be very useful! – Alex Hirzel Feb 28 '15 at 12:31
  • 2
    I really hate to see good libraries released under GNU, this literally makes it useless. – metablaster Jun 07 '20 at 02:26
  • @metablaster I know and have used ROOT and TMVA extensively in my time and they are very convenient given you use nix-based system. Ever since I moved on to windows, I can barely build it, let alone compile any of my own codes. It doesn't really matter because I don't work with CERN but every so often I just miss the convenience. –  Mar 28 '21 at 15:36
9

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.

Alexandre C.
  • 55,948
  • 11
  • 128
  • 197
6

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

Gant
  • 29,661
  • 6
  • 46
  • 65
  • 4
    Have a look at Gnuplot iostream: a single header library giving intuitive access to the Gnuplot functionalities directly from your C++ code. I love it! – DarioP Jan 14 '16 at 10:30
4

u can use DISLIN

it is quite neat!

KansaiRobot
  • 61
  • 1
  • 3
3

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

SteveL
  • 1,811
  • 1
  • 13
  • 23
3

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

jfs
  • 399,953
  • 195
  • 994
  • 1,670
1

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

Kev
  • 15,899
  • 15
  • 79
  • 112
1

We use an ancient version of ComponentOne Chart.

John Dibling
  • 99,718
  • 31
  • 186
  • 324
1

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.

  • 2
    AGG is a rendering engine, not a plotting library. Using it for plotting would require re-implementing matplotlib on top of it. – Thelema Apr 16 '13 at 22:38
1

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
Seika
  • 179
  • 4
1

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

  • 2
    is it able to plot in "real time"? (or near real time)? To be clear - I want to be able to update from a data source and draw as new points arrive. – Tim Sep 30 '09 at 20:48
-2

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.

luiscubal
  • 24,773
  • 9
  • 57
  • 83
  • 8
    Downvoted because I dont think recommending to roll your own on a library recommendation question is not actually answering it. – antipattern Nov 12 '15 at 15:08