Working with NetSpell and NPlot - 4.7 Creating Graphs and Plot Charts Quickly with NPlot
(Page 3 of 5 )
NPlot is a flexible and simple-to-use open source charting library for the .NET Framework v2.0. NPlot’s ability to quickly create charts makes it an ideal tool for data inspection, debugging, or analysis purposes. The library’s flexibility also makes it a great choice for creating carefully tuned charts for publications or as part of your application’s interface.
NPlot at a Glance Tool | NPlot |
Version covered | 0.9.9.3 |
Home page | http://www.netcontrols.org/nplot/ |
Power Tools page | http://www.windevpowertools.com/tools/147 |
Summary | A charting library for .NET 2.0 with a simple, flexible API |
NPlot at a Glance (continued)License type | Custom (effectively, a choice of GPL-compatible or BSD with an advertising |
| | clause) |
Online resources | Wiki |
Supported Frameworks | .NET 2.0 |
Related tools in this book | WebChart |
Getting Started
NPlot requires version 2.0 of the .NET Framework. You must also agree to the terms of its license. The license is very relaxed on the use of NPlot in other open source software or software written for personal use, but use of NPlot in a closed-source application requires that you advertise NPlot’s role in your application’s About box or documentation.
You can download the NPlot library from the Download Area link on the tool’s home page. NPlot is distributed in a .zip file that contains the assembly, complete C# source to the library, and a C# demo showing the library in action.
Using NPlot
To create a chart, the first thing you need to do is construct an instance of a PlotSurface2D class. The role of this object is to coordinate the display of the axes, title, and legend, as well as all the data-dependent elements of the chart. NPlot provides three such classes:
Windows.PlotSurface2D
A Windows Forms control that implements plotting
functionality and enables management of a user’s
interaction with the chart.
Bitmap.PlotSurface2D
A Windows Forms control that allows you to easily
draw charts on aSystem.Drawing.Bitmapobject.
This class is often used in web applications to
generate dynamic charts and is also useful in
debugging.
Web.PlotSurface2D
An ASP.NET control that implements the
IPlotSurface2Dfunctionality. The implementation of
this control compromises performance, and its use is
not recommended.
APlotSurface2D class that allows charts to be used in GTK# applications created with Mono (the free C# compiler/.NET implementation) under Linux has also been written for an older version of NPlot. This class is not currently maintained as part of the library, but it might be in the future.
Next: Plots and drawable objects >>
More BrainDump Articles
More By O'Reilly Media
|
This article is excerpted from chapter four of the book Windows Developer Power Tools, written by James Avery and Jim Holmes (O'Reilly; ISBN: 0596527543). Check it out today at your favorite bookstore. Buy this book now.
|
|