Hacker News new | past | comments | ask | show | jobs | submit login
Matplot++ – A Plotting Tool for C++ (github.com/alandefreitas)
137 points by ponderingfish on Aug 30, 2020 | hide | past | favorite | 20 comments



Excited to give this a shot next week. Earlier, I had to export all my data to txt/csv and use either matlab, python, gnuplot to visualize it.

It would be great to be able to do this directly within code and conditionally turn it on/off for debugging using some #ifdefs.


I love how the page has screenshots of hundreds of types of charts. This is usually what I want to first look at for a plotting library.


It’s pretty amazing to be reading the examples and almost feel like it’s code for matplotlib save an auto or angle brackets here and there. I’ve spent hours waiting for matplotlib to render data over the years.

I just hope the compile times aren’t atrocious or that some kind of interactive mode is possible.


Wow this looks incredible! I’ve been looking for a C++ plotting library suitable for real-time audio visualization but with a matplotlib-like api. This looks to fit the bill perfectly, and with great documentation. Well done, following.


Does anyone know if there is any effort going on to make gnuplot also available as a lib?

Dependencies like gnuplot are nice on linux machines, but distributing it on Windows is always a little bit painful


Seems difficult to do, because of the terms in the gnuplot license:

> Permission to modify the software is granted, but not the right to distribute the complete modified source code.

https://sourceforge.net/p/gnuplot/gnuplot-main/ci/master/tre...


Given the name, that is very surprising.

Wikipedia has a section on this [1], and apparently it is not named after the GNU project, but after the animal.

[1] https://en.wikipedia.org/wiki/Gnuplot#Distribution_terms


Wow, I would have sworn it was a GNU project if someone had asked. It just seems so typical of a GNU project: free, open source, around for as long as I can remember, available on every Linux but with a dated look and feel.


You can distribute the modifications as patches and precompiled binaries with the attendant patches, so it seems like it should be fine?

Not having gone into the source I'd guess that possible problems might be the code not being factored to make it easy to be called as a library (unlike e.g. curl), or perhaps compiling gnuplot for windows might be problematic. You might be able to go pretty far by bundling a statically-linked gnuplot binary and shelling out? No experience with windows development here so I'm just speculating.


This looks really cool.

Another great plotting library for C++, if you can use Qt, is Qwt:

https://github.com/opencor/qwt https://qwt.sourceforge.io/


Looks absolutely incredible. Sort of matplotlib for c++, will look into the internals when I have the time.

Seems like everything for Python these days is matplotlib based; Whereas everything for R is ggplot2 based (but even the ggplot libraries for Python are mostly based on matplotlib).


Matplotlib is amazing EXCEPT for the speed and the 3D plotting. This looks quite intriguing to me.


If you're familiar with Matplot on Python, you might find this useful. I've been using it lately https://github.com/lava/matplotlib-cpp

The posted library does look nicer though.


This looks really good. It’s much more intuitive than most other gnuplot wrapper I’ve seen and tested.


This is amazing. I’ve been looking for something like this for a while.

It doesn’t do the one type of plot I actually want for the project I’m working on (x,y,z data as a 3d bar chart “surface”), but that takes nothing away from just how good this is.


Very very cool. What does it mean by x, y are any ranges? Do x and y have to be arrays?


> Do x and y have to be arrays?

Nope. Ranges are anything enumerable (can run an iterator through it by calling begin()/end() to get the boundaries), so you can do lists, arrays, generators etc.


Looks very promising... I wanted something like this for sometime for a project..

Is is a new project or has it been around for some time? Github history shows only commits from Aug 2020 onwards only..


Impressive. I would have loved this back when i made all my plots with root 2.x...


Looks great, a wide range of different plots.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: