Granville Barnett

Free graphing libraries for .NET - my thoughts

I've not really looked around until today, but I really wanted to include graphing as part of some tooling for CPUSS and I found two libraries:

Each of which from what I have read on the web has a pretty decent reputation, although NPlot tended to be associated with a lack of documentation/examples but I figured this wouldn't be a problem as I am pretty clued up on graphing, and I hoped that the library respected certain naming conventions and so on from the theory side...it did thankfully!

I had heard of NPlot before, if only in passing - ZedGraph I had never heard of though before and surprisingly out of the two it seemed to be the more established in terms of release drops.

So I had two libraries that could create various graphs, then I decided to take each for a spin...

NPlot

Surprisingly after all I had read about NPlot I actually found it very easy to figure out, I didn't use the WinForms designer (as you can tell from the project) I did everything from scratch as I needed a more atomic control on things and the designer hides a lot of that stuff.

I very quickly created a nice graph with 3 line plots on.

Plot of Simulation

Very simple, I have noted a few observations in the project files that you can read if you are interested relating around surface axis labels and the x-axis data values.

ZedGraph

I found ZedGraph to be a little overkill for what I needed although it did offer a lot of more visual candy than NPlot seemed to.

WindowClipping

Needless to say I played around with ZedGraph for a while and saw that while it was very easy to use, NPlot seemed to provide more elegant off the bat graphs with minimal input from me.

Summary

Even though I only played with each for a very brief time I found NPlot to be a bit quicker to setup than ZedGraph, the latter of which seems to hold a lot more usability hooks - things like graceful zooming, associating symbols with graphs etc.

If you know of any other libraries that are free and worth checking out please let me know!

Posted: Mar 23 2008, 09:49 PM by gbarnett | with 6 comment(s) |
Filed under: , , ,

Comments

Jamie McQuay said:

Yes, documentation for NPlot, we know...

I'm going to be setting up a new documentation project for NPlot in the near future.

Jamie McQuay

# March 24, 2008 8:09 AM

rrobbins said:

NPlot does suffer from a serious lack of documentation/examples, especially if you are interested in bar charts. I submitted some examples of bar charts but it does not look like they used them. Check out my blog post on NPlot if you need some sample code for bar charts.

# March 24, 2008 8:47 AM

gbarnett said:

@Jamie - I knew you would know :-)

@rrobins - thanks, I think for the time being line plots will do me for the data I am knocking around.

# March 24, 2008 3:55 PM

Igor Brejc said:

I think the two you mentioned are most commonly used. I use ZedGraph and I'm quite pleased with it, although if you want to play around with the details, it does take some time to adjust the graphs the way you want.

Here's a list of some OS charting libraries:

csharp-source.net/.../charting-and-reporting

# March 25, 2008 9:54 AM

gbarnett said:

Thanks for that Igor :-)

ZedGraph definatley looked to be the most customizable and feature rich, I just went with the framework I felt was the easiest to get up and running.

I'm not actually using the graph in a windows form, or asp.net page, rather I am creating a graph and then saving it as a bitmap.

# March 25, 2008 2:29 PM

Granville Barnett said:

I tend to use Octave for maths based stuff, including visualizing the plotting of functions and so on

# June 3, 2008 6:49 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)