Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
C# seems to show some promise for scientific computing, but I found very little about one plotting 2D graphs, which is very important both for science student and scientists.
Is there a reliable, free, way to create publication quality 2D plot with C# ? And the capacity to save to several formats (png, eps, ...). Something similar to Python's matplotlib ?
There is OxyPlot which I recommend. It has packages for WPF, Metro, Silverlight, Windows Forms, Avalonia UI, XWT. Besides graphics it can export to SVG, PDF, Open XML, etc. And it even supports Mono and Xamarin for Android and iOS. It is actively developed too.
There is also a new (at least for me) open source .NET plotting library called Live-Charts. The plots are pretty interactive. Library suports WPF, WinForms and UWP. Xamarin is planned. The design is made towards MV* patterns.
But #Paweł Audionysos suggests not such a good performance of Live-Charts WPF.
ZedGraph is a good choice.
See Samples Environment for Microsoft Chart Controls:
The samples environment for Microsoft Chart Controls for .NET Framework contains over 200 samples for both ASP.NET and Windows Forms. The samples cover every major feature in Chart Controls for .NET Framework. They enable you to see the Chart controls in action as well as use the code as templates for your own web and windows applications.
Seems to be more business oriented, but may be of some value to science students and scientists.
gnuplot is an actively maintained program widely used in the scientific community. Normally plots are generated from data files which you can write out in your C# program, but it is also possible to call the gnuplot executable from C# and display the generated image in a C# picture box.
I started using the new ASP.NET Chart control a few days ago, and it's absolutely amazing in its capabilities.
Here is the link.
EDIT: This is obviously only if you are using ASP.NET. Not sure about WinForms.
I just wanted to supplement MajesticRa's recommendation of OxyPlot, and point out how OxyPlot can be used for a variety of plotting cases. The software is free and Open-Source, very polished, and allows for a variety of uses beyon normal 2D mapping.
I've been using OxyPlot for an unorthodox project, where I display (in WPF/C#) a map (Robotic Occupancy Grid) which I could overlay with LineSeries (Path Traveled) and PointSeries (Way Points). Using the OxyPlot ImageAnnotation feature I am able to display 60Hz Video within my OxyPlot, by periodically updating the ImageAnnotation on its own thread, while mapping Series of points overtop the video. The background video and points are even scalable and translatable.
Hopefully this is helpful for other looking to display plots overtop of images and videos.
NPlot is a pretty good simple open source 2D plotting API. Unfortunately, the web site is down. I don't know if this is just temporary or not. I haven't heard of any bad news. It may come back up.
http://www.nplot.com
Here is an article describing it:
https://web.archive.org/web/20210612110405/https://aspnet.4guysfromrolla.com/articles/072507-1.aspx
The previous article uses VB.NET, but obviously this will work with C#.
Again, not sure why nplot's site is not currently working but it is a somewhat popular plotting API that I've used in the past. I post it for your information and in case of the likely event nplot will be back up soon. :)
Edit:
Thanks to a Hosam Aly, it looks like the SourceForge project can still be accessed here:
http://sourceforge.net/projects/nplot
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I need to be able to generate dependency diagrams programmatically. I'd like it to be able to generate a bunch of boxes with labels and connectors linking them, and ideally the component would position them automatically onto a design surface which could then be manually rearranged.
I'm using WinForms and C# 2.0 (VS2005).
EDIT: However, since it'll be an internal tool, I can probably use 3.5 SP1 and WPF if there any suggestions in that arena.
Must be free or open source.
Any recommendations?
Too late for the questioner but perhaps interesting for researchers:
NShape
NShape is an Open Source diagram designing framework for .NET
WinForms. Software developers use NShape to integrate diagramming
capabilities into their applications. Using NShape, applications let
users view, annotate, modify and create diagrams like flow charts,
wiring schemes or project charts. NShape is open source and has a dual
license which allows it to be employed for free in open source
projects and for a license fee in commercial projects.
Did you try the CodeProject article series by Sukram:
WPF Diagram Designer
Here is some references which might be interesting for you:
Diagram.NET
Diagram.NET is a free open-source
diagramming tools written entirely in
C#.
Put Diagram.NET WinForm Control into your form and, like Microsoft Visio®, the user can draw shapes and links. With some code you can control, change, add and delete these elements.
Microsoft Chart Controls
The samples environment for Microsoft
Chart Controls for .NET Framework
contains over 200 samples for both
ASP.NET and Windows Forms. The
samples cover every major feature in
Chart Controls for .NET Framework.
They enable you to see the Chart
controls in action as well as use the
code as templates for your own web and
windows applications.
You might want to take a look at GraphViz which is being distributed under CPL (i.e. free of charge). It is not exactly for .NET/WinForms but can be useful anyway. The library's main purpose is to visualize graphs (and dependency diagram is effectively a [directional] graph). You can use it to either get an image (graph layout) or an array of points (coordinates for you items).
OpenDiagram
Open Diagram is the definitive open source .net diagramming
component library for the .Net framework winforms environment.
Use Open Diagram to add interactive data visualizations to your .net
applications.
I have tried it with WinForms, works very well.
I have similar request as yours. Here's one open source solution for drawing diagrams. It's from Microsoft and samples written in C#.
https://github.com/Microsoft/automatic-graph-layout
Here's one that renders to HTML5 (You can easily extend to Visio) from GridWizard/Github
Source code: https://github.com/gridwizard/SimpleFlowDiagram
Wordpress doc: https://gridwizard.wordpress.com/2015/03/25/simple-c-library-to-render-graph-to-flowchart/
Downside is, you need a viewer to display HTML5. Alternatively, SimpleFlowDiagramLib already calculate Node.x and Node.y - you can render it to Winform/WPF yourself (but then you need to code rendering yourself)
Vote for NShape. More or less it's fine.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Last week i searched for good free or opensource solutions and component for GIS (Geographical Information Systems) I founded some system but no one fill my requirements
SharpMap is very buggy software
Gmap.net is very slow
MapWindow have a very complex structure and is very buggy.
I founded uDIG but is in java, i need a solution in vb.net or c#.
Anyone know a good solution that fill my requirements or have alternatives, i accept solutions?
You are limiting yourself a lot by insisting on .NET. I don't know of anything other than SharpMap or MapWinGIS ActiveX (MapWindow). Here are some free, but not .NET, options for Windows desktop applications.
If you'd consider writing your standalone application in Python or C++:
Mapnik
QGIS
Or if you'd consider writing a plug-in or a customisation for an existing GIS:
GRASS can be customised in Python, Perl, Ruby...
QGIS can be customised in Python
I think that you've covered it already. There really aren't any production quality open source GIS project out there using C#. Most of the good work is being done in Java, C/C++ or Python these days. If you must use the .NET Framework then I think the best of the bunch is indeed SharpMap.
Failing that you need to look at commercial products from companies like http://www.esri.com. Of course, it also depends on what you need: web services, Windows Forms control, WPF, etc. In the past I've managed to whip up some C# that constructed the right XML to send to a Java server-based mapping engine, so you could look at something like GeoServer and build your own client. Obviously not what you want to get in to but I don't see that you have many options beyond the ones you've listed.
I would recommend to look in to MapAround
Have you checked out SharpMap? It's available on codeplex.
MapSurfer.NET framework might be a good option.
MapSurfer.NET is free, modern cartographic framework which is able to provide maps of superior cartographic quality. This framework supports a bunch spatial data formats (e.g., Shape files, PostgreSQL, OSM, etc.) and web services (e.g., CartoDB, Mapzen, etc.). Furthermore, its setup includes MapSurfer.NET Studio application which allows creating and editing map styles (analogue of TileMill). Its symbology is inspired by both OGC specifications and other similar toolkits such as MapServer, GeoServer or Mapnik.
We use Mapzania (http://www.mapzania.com).
The best thing about it is that you load it into existing web-applications via a NuGet package and then you get a bunch of GIS functionality.
It uses Leaflet as its front-end and it has JS library that makes it easy to do stuff to Leaflet.
It also has a nice MapStyler for creating and editing maps.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am looking for Graph libraries for .net. Are there any out?
ps: I mean GRAPH libraries, not graphics nor charting libraries!
edit: What I mean is graphs, from graph theory:
(source: sourceforge.net)
I also need it to have drawing capabilities.
Use a combination of QuickGraph (GitHub, CodePlex) and Graph# for WPF (GitHub fork, CodePlex) - both top notch libraries. They work really well for me but the documentation for Graph# is almost non-existant.
I am working in the NDepend team and we switched from GraphViz to MsAgl (Microsoft Automatic Graph Layout) in september 2008. The MsAgl license allows commercial utilisation. Here are a few sample pictures of MsAgl graphs integrated in NDepend (everything is interactive, nodes are movable/selectable/removable/clickable, edges are editable/selectable/removable/clickable, the layout is zoomable, and also, while it could be cleaner the MsAgl API is clean enough to work with):
Though my previous post get deleted I'll try to give more complex answer on the question.
The topmost answer is not quite actual anymore as the Graph# library is strongly outdated.
I'll recommend to check the combination of GraphX and Quickgraph. GraphX as the rendering engine and Quickgraph as the graph management and math operation component.
GraphX library is coded for WPF 4.0 and METRO. It provides many features that Graph# lacks:
Improved rendering performance for large graphs
Edge routing and bundling support, many other edge options
Enhanced zoom control which supports Overview window and multiple vertices selection
Rich documentation and samples
Also GraphX supports all the original layout algorithms from Graph#.
There is QuickGraph, it works pretty well and has most of the basic algorithms.
Take a look at yWorks:
http://www.yworks.com/en/index.html
There aren't a massive amount of good libraries out there, from what I've seen.
You can use the NodeXL API from Microsoft Research at: http://www.codeplex.com/NodeXL but a similar question has been asked at: https://stackoverflow.com/questions/44090/do-you-know-any-graph-visualization-libraries-for-net/
Take a look at Satsuma. Written in C#, mainly graph algorithms, but there is some basic graph layout and drawing as well.
I haven't tried it yet but ran across an interesting offering from MS Research for visualizing directed graphs Microsoft Automatic Graph Layout.
Try using "directed graph" or "digraph" for search terms. I get a lot of hits.
Check out
http://quickgraph.codeplex.com/
They have support for visualization via DotViz and Glee.
For visualization, i'd also check out
http://flare.prefuse.org/
Though its flash, it seems very interesting, and they have at least tree visualization, though you may be able to coax some non-directed graphs out of it.
The C5 Generic Collection Library
for C# and CLI
Buddy I think this is what you need!
This article presents a Generic Graph
Library, 100% C#. This library is an
attempt to port the Boost Graph
Library (BGL) from C++ to C#.
We've used ZedGraph which is an Open Source project written in C#, so you can tweak it if you feel it is necessary. It served our needs which sound like they're very close to what you described. There's even a wiki site for the project with some pretty good samples.
Matlab has good support for graphing, and with a few lines of .NET you can call a .m file to display graphs. See Creating a graph or a plot from a C# console app, using Matlab?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am working on a project for my company, and I need to integrate some graphs of different types and average complexity to C# in the process of studying stock markets. I found this free library on the Internet, ZedGraph. If you came across it, do you recommend using it? And how well is it supported?
I can recommend ZedGraph. I have been using it with great
success for several years in MSQuant, for most plots: mass
spectrum display, recalibration error plots, LC peak plots,
quantitation profiles and others.
Here are some screen-shots from MSQuant where ZedGraph has
been used:
Scatter plot, with trendline
X-Y plot with the actual data points shown, line connection data points
Sticks plot, with overlayed annotation (TextBoxes, in fact)
Several plots in the same window, types as in 2. and 3. (the two plots in the bottom half)
Closer look at type 2.
Collage, type 2. and code in Visual Studio
The source code that is behind the first plot can be found in Source code for MSQuant: frmRecalibrationVisualisation.vb, MSQuant/msquant/src/GUI/forms/frmRecalibrationVisualisation.vb..
In contrast to many other charting libraries, ZedGraph can
also be used for scientific/math oriented plots/charts (for example,
scatter plots) and not only for business-type plots/charts.
Stock market applications may also need scatter plots.
In ZedGraph, there is built-in support for the user to zoom
in (infinite) and zoom out, pan (drag while holding down the
Ctrl key), save the plot to a file or copy it to the
clipboard.
There is one thing I am missing in ZedGraph: the ability for
the user to select items in the plot in order to perform
some action on those selected items (for example, computing some
number, accepting them as verified or marking them as
outliers to the application program).
Don't be put off by the state of ZedGraph's development.
ZedGraph is mature, is of very high quality, and can be used
as-is. There is supposed to be a new team behind its further
development.
ZedGraph does not appear to be supported by the original developers anymore. However, you can find it as part of other projects where updates have been made.
For example, per this discussion on a ZedGraph project discussion list:
So I highly optimized ZedGraph for all
the curves, and objects. Basically, I
optimized how it uses GDI and
specifically made it only draw objects
that will fit in the chart.
So it scrolls and zooms now extremely
efficiently even if I have many
millions of objects on the chart. Plus
it users nearly zero CPU when it's
running in real-time as slower speeds
for tracking financial charts.
I fixed a few defects also.
You can find a fork of the repo with the changes here.
I strongly recommend the Microsoft Chart Controls For .NET Framework 3.5 over ZedGraph.
Do you mean Zedgraph rather than Zgraph? Zedgraph's homepage is here and is described in a CodeProject article here.
If you are talking about Zedgraph I can recommend it, I have relatively little experience in C# but quite a lot in data visualization. I found it straightforward to get Zedgraph up and running and producing good-looking charts. Zedgraph is very good for 2D charting, I'm still looking for an equivalent for 3D plotting.
I hate to be a killjoy, but I wouldn't recommend ZedGraph.
I was working with it a couple of years ago and noticed that the support was provided by a single enthusiast that seemed abused by everyone wanting his freeware with no compensation or contributions. It's a curse faced by a lot of FOSS authors.
It doesn't look like the software has been updated in over a year now and the help forum is full of queries with no responses. It looks like the author lost interest and walked.
If you use ZedGraph, do it because you want to maintain the underlying code and because you want to contribute back to the user/developer community. If you have no interest in contributing, and you can't maintain it for yourself, be prepared for things that don't work and simply never will. An enterprising company could sponsor the development of the software and offer for-fee support, but you need to decide for yourself if it's good enough to do that and if there is a real revenue model.
Although development seems to have stalled, WPF Dynamic Data Display looked promising.
ZedGraph does not support 3D graphing, such as Surface Chart: Implied Vol Surface
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I want to connect to a USB Webcam in .NET, specifically using C#. Being new to .NET I don't know what kind of support there is in the standard libraries for doing so. I found one example on the web that copies bitmaps through the clipboard, but that seems very hacky (and probably slow). Is there a better way?
You will need to use Windows Image Acquisition (WIA) to integrate a webcam with your application. There are plenty examples of this readily available. Here is a C# Webcam User Control with source.
Here are some more articles and blog posts from people looking to solve the same problem you are:
MSDN Coding4Fun: Look at me! Windows Image Acquisition
CodeProject: WIA Scripting and .NET
CodeProject: WebCam Fast Image Capture Service using WIA
clausn.dk: Webcam control from C# and WIA
Interesting side note, WIA isn't supported by Vista for doing Captures from Webcams anymore. They mainly targeted it towards Scanners and pulling stills from cameras.
Also, larger manufacturers like logitech have abandoned WIA is favor of DirectShow.
Here is nice example of doing this. It's using DirectShow.Net (http://directshownet.sourceforge.net/), which is propably better than using "clipboard" :D.
https://www.codeproject.com/Articles/18511/Webcam-using-DirectShow-NET
Theres a package with functions with a lot of things to do with computer vision systems called AForge. And they have an easy way to get webcam images from a USB camera if you're still looking.
Just check out the sample code for computer vision motion sensor example code. I'm sure you can pull out the function calls you need from it as I did.
[sorry to necro, but this could be of use to someone in the future]
On my computer, WIA was painstakingly sloooow... so i decided to give the Windows Multimedia Video Capture a try.
You can find a demo here.
It really depends on what you want to do. WIA is primarily for capturing stills from imaging devices, and DirectShow (used either through directshow.net or managed DirectX) is for access to fuller video features.
The other option is to create a WPF application. It has a huge amount of built in support for video (to the extent that having a looping video clip as a button is pretty trivial), and should be quick and easy to develop.