C++: Create a Plot Graph Using a Console Application [duplicate] - c++

I just learned about Graphs and I want to plot them when I create them randomly.
How should I go about doing this?
EDIT:
I am talking about Graphs which are a collection of edges between vertices and not a plot of y=f(x).

what kind of graph? Directed graphs are different from scatter plots. 3D and/or 2D graphs?
Do you care whether it's c or c++?
Are you looking to write your own or are you looking for a library? There are LOTS of libraries, as a simple Google search would show.
If you want to create good, publication-quality graphs easily there are many standalone utilities like gnuplot, latex, R, mathematica etc. It is very easy to create a bad graph.

Take a look to graphviz library. You can find it here: http://www.graphviz.org/ .

One option is ROOT http://root.cern.ch/drupal/ from CERN. Examples: http://root.cern.ch/drupal/category/image-galleries/higgs-plots

Checkout Cairo, its open source, cross platform and easy to use.

Related

2d graph in real-time by using opencv and c++

I have a really basic question in opencv and c++. I am trying to graph something in real time by using opencv. I am looking to find a function to draw a graph in rel-time. But still unssuccesful.
I need a function that gets two arrays as an input one for x axis and one for y. I tried with this but seems not work in real-time http://www.shervinemami.info/graphs.html
I just need to know if there is something available in opencv or not.
Thanks in advance.
OpenCV provides just low level drawing primitives, so you have to look for other libraries to plot chars, or create the code yourself.

Creating SVG image in c++

I want to create a SVG image programmatically using preferably c++ from some image points. Can anyone help me with that?
simple-svg is a header only svg lib easy to use:
simple_svg_1.0.0
Here is an example how to use it: main_1.0.0.cpp
It is also hosted on GitHub.
You could check out LibBoard. I have no experience with it myself, so I can't vouch for its usefulness, but it does appear to be what you're looking for. I'm not sure how complicated your target image is going to be, but the website states:
For now, LibBoard can handle primitives like lines, rectangles,
triangles, polylines, circles, ellipses and text.
In future releases, bitmap insertion should be supported.
See the TODO file for a list of features that should be added in future releases.
So you'll have basic functionality from it, and you can probably mess around with the basic list of shapes to create some pretty complicated images.
I used GraphViz to do that, using 'dot' language, check it out.

How can I chart 3d scatter graphs in C++?

What is the best way to chart a 3D scatter graph in C++?
Or maybe it's easier to use an external programs. Can you recommend my anything?
Did you heard about ChartDirector. I used to use it but don't know if they have a 3D scatter chart. Try http://www.advsofteng.com/1
What you'll want is some form of GUI library - you could use, say, ncurses, but graphs in a terminal are rather difficult. Any GUI library will do it.
FLTK is the easiest to pick up and can definitely accommodate your problem, but GTK should also do it, along with wxWidgets et al.
Failing that, OpenGL is probably a hacky way to get it done!
Hope this helps.

Scalable and dynamic graph visualization library in C++

I am developing a piece of software that makes an intensive use of graphs. I'd like to visualize these graphs (they may become quite large). Is there a good C++ library (or in another language, but with a C++ API) that allows for fast, easy, and scalable visualization of graphs?
I would be interested in features such as zooming on some parts of the graph, or have 3-d rendering using OpenGL.
Do you use Boost.Graph? Then you can write .dot-files with write_graphviz and let GraphViz do the drawing.
Related to: https://stackoverflow.com/questions/492893/graph-drawing-c-library

Animation with C++

is there anyway to build rich animation with C++?
I have been using OpenCV for object detection, and I want to show the detected object with rich animation, Is there any easy way to realize this?
I know flash can be used to easily build rich animation. But can flash be reliably integrated with C++ and How?
Also, Can OpenGL help me with this? To my knowledge, OpenGL is good for 3D rendering. But I am more interested in showing 2D animations in an image. So I am not sure whether this is a right way to go.
Another question, how are those animations in augmented reality realized? What kind of library are they using?
Thank you in advance.
Its difficult to tell if this answer will be relevant, but depending on what sort of application you are creating you may be able to use Simple DirectMedia Layer.
This is a cross-platform 2D and 3D (via OpenGL) media library for C, C++ and many other compatible languages.
It appears to me that you wish to produce an animated demo of your processing results. If I am wrong, let me know.
The simplest way to produce a demo of a vision algorithm is to dump the results to a distinct image file after each processed frame. After the processing session, these individual image files are employed to prepare the video using e.g. mencoder. I employed such procedure to prepare this.
Of course, your program can also produce OpenGL. Many people dealing with 3D reconstruction do that. However, in my opinion that would be an overkill for simple 2D detection. Producing flash would be an even greater overkill.