You should definitely look for any such library in CodeProject under Desktop Development β Miscellaneous . But for me, I would use a β 2D data visualization class β that provides a very nice set of functions (from the article):
- Normal mode and scatter graph mode
- Autoscale
- Scaling
- Set width, height and page
- Mouse coordinate tracing
- Ability to add and display interactively up to 15,000 dots per second (depending on computer speed)
- Support for panning - just press and hold the Shift key while moving the mouse with the left button pressed. The graph can be drawn in any device context, including the printer
Another option is to use ready-to-use MFC or ActiveX components. A very good example of the former is the Graphics Graphics Library , and an example for the latter is GDI + Plot ActiveX Control . As you mentioned, all of these libraries are based on the Windows GDI object. BTW, you can draw this simple graph yourself, because the GDI (and GDI +) tool on Windows is very powerful.
Also see " SoftIntegration Graphical Library (SIGL) ". The library contains many different graphs and surfaces.
But, again, this is only about GDI. Another option is to use DirectX or OpenGL. For the latter, you definitely need to try SDL (Simple DirectMedia Layer), which:
It is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D equipment via OpenGL and 2D framebuff. As you can see, this is a cross-platform library.
The good SO questions you need to familiarize yourself with are:
UPDATE:
I forgot to mention " ROOT " - this is the most powerful graph library I've ever seen. This is actually not a library, but a βData Analysis Framework.β The creators of the library are the guys from CERN. Using this library you can create almost all kinds of plots and surfaces and graphics that you have ever imagined. It is cross-platform and written in C ++. ROOT has both a console version (where you can write a command in C ++ - ROOT has its own C ++ compiler) and a huge set of libraries for communicating with your projects. You can create MFC applications using it in both MSVS 2008 and MSVS 2010.
source share