使用 C# 绘图

发布于 2024-07-13 12:07:11 字数 1542 浏览 5 评论 0 原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

戒ㄋ 2024-07-20 12:07:11

我推荐的是 OxyPlot 。 它有 WPF、Metro、Silverlight、Windows Forms、Avalonia UI、XWT 的软件包。 除了图形之外,它还可以导出为 SVG、PDF、Open XML 等。它甚至支持 Android 和 iOS 的 Mono 和 Xamarin。 它也在积极开发中。

还有一个新的(至少对我来说)开源 .NET 绘图库,名为 Live-Charts。 这些情节非常具有互动性。 库支持 WPF、WinForms 和 UWP。 Xamarin 已计划。 该设计是针对 MV* 模式而设计的。
但 @Paweł Audionysos 认为 Live-Charts WPF 的性能并不好。

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.

吃素的狼 2024-07-20 12:07:11

ZedGraph 是一个不错的选择。

ZedGraph is a good choice.

素手挽清风 2024-07-20 12:07:11

请参阅Microsoft 图表控件的示例环境

.NET Framework 的 Microsoft 图表控件示例环境包含 200 多个ASP.NET 和 Windows 窗体示例。 这些示例涵盖了 .NET Framework 图表控件中的每个主要功能。 它们使您能够查看正在运行的图表控件,并将代码用作您自己的 Web 和 Windows 应用程序的模板。

似乎更面向商业,但可能对理科学生和科学家有一定价值。

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.

同尘 2024-07-20 12:07:11

gnuplot 是一个在科学界广泛使用的积极维护的程序。 通常绘图是从数据文件生成的,您可以在 C# 程序中编写这些数据文件,但也可以从 C# 调用 gnuplot 可执行文件并在 C# 图片框中显示生成的图像。

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.

长梦不多时 2024-07-20 12:07:11

几天前我开始使用新的 ASP.NET Chart 控件,它的功能绝对令人惊叹。

这是链接。< /a>

编辑:这显然仅适用于您使用 ASP.NET 的情况。 不确定 WinForms。

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.

半世蒼涼 2024-07-20 12:07:11

我只是想补充 MajesticRa 对 OxyPlot 的推荐,并指出 OxyPlot 如何用于各种绘图案例。 该软件是免费且开源的,非常完善,并且允许超出正常 2D 映射的多种用途。

我一直在一个非正统的项目中使用 OxyPlot,在其中我显示(在 WPF/C# 中)地图(机器人占用网格),我可以用 LineSeries(行进路径)和 PointSeries(路径点)覆盖它。 使用 OxyPlot ImageAnnotation 功能,我可以在 OxyPlot 中显示 60Hz 视频,方法是在其自己的线程上定期更新 ImageAnnotation,同时在视频上方映射一系列点。 背景视频和点甚至可以缩放和翻译。

希望这对其他想要在图像和视频之上显示绘图的人有所帮助。

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.

奶气 2024-07-20 12:07:11

NPlot 是一个非常好的、简单的开源 2D 绘图 API。 不幸的是,该网站已关闭。 我不知道这是否只是暂时的。 我还没有听说任何坏消息。 它可能会回来。

http://www.nplot.com

这是一篇描述它的文章:

https://web.archive.org/web/20210612110405/ https://aspnet.4guysfromrolla.com/articles/072507-1.aspx

上一篇文章使用了 VB.NET,但显然这也适用于 C#。

同样,不知道为什么 nplot 的网站当前无法运行,但它是我过去使用过的一个比较流行的绘图 API。 我将其发布以供您参考,如果发生可能的事件,nplot 将很快备份。 :)

编辑:

多亏了 Hosam Aly,看起来 SourceForge 项目仍然可以在这里访问:

http:// sourceforge.net/projects/nplot

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文