1. 网址收藏 → 我可以帮你整理一个程序员/开发/资料类的网址收藏清单,方便你查找学习。
  2. OxyPlot 正态分布图 → 用 C# 调用 OxyPlot 绘制标准正态分布(高斯曲线)的示例代码。

① 网址收藏(精选实用开发工具站)

分类网站名称地址用途
文档 & APIMDN Web Docshttps://developer.mozilla.org/Web 前端/JavaScript 官方参考
文档 & APIDevDocshttps://devdocs.io/集成多种编程语言/API 文档
在线编译Repl.ithttps://repl.it/在线运行多种语言代码
代码托管GitHubhttps://github.com/代码版本管理与协作
代码托管Gitee(码云)https://gitee.com/国内代码托管平台
数据可视化EChartshttps://echarts.apache.org/前端可视化图表库
C# 图表OxyPlothttps://oxyplot.readthedocs.io/.NET 图表绘制库
工具JSON Editor Onlinehttps://jsoneditoronline.org/JSON 数据可视化编辑
工具Regex101https://regex101.com/正则表达式测试
学习LeetCodehttps://leetcode.com/算法与数据结构刷题
学习W3Schoolshttps://www.w3schools.com/前端/后端基础教程
学习菜鸟教程https://www.runoob.com/全栈入门教程
学习阮一峰的网络日志https://ruanyifeng.com/blog/技术文章与教程
PDF 工具SmallPDFhttps://smallpdf.com/在线 PDF 编辑、转换

② OxyPlot 绘制正态分布图(C#)

下面的例子用 C# + OxyPlot 绘制一条标准正态分布曲线(μ=0, σ=1)。

using OxyPlot;
using OxyPlot.Series;
using System;
using System.Collections.Generic;

class Program
{
    static void Main()
    {
        var model = new PlotModel { Title = "正态分布曲线" };

        var series = new LineSeries
        {
            Title = "N(0,1)",
            StrokeThickness = 2
        };

        double mean = 0.0;   // μ
        double stdDev = 1.0; // σ
        int points = 200;    // 数据点数量
        double step = 0.1;

        for (double x = -4; x <= 4; x += step)
        {
            double y = (1 / (stdDev * Math.Sqrt(2 * Math.PI))) *
                       Math.Exp(-0.5 * Math.Pow((x - mean) / stdDev, 2));
            series.Points.Add(new DataPoint(x, y));
        }

        model.Series.Add(series);

        // 导出为图片
        var pngExporter = new OxyPlot.SkiaSharp.PngExporter { Width = 600, Height = 400 };
        using (var stream = System.IO.File.Create("normal_distribution.png"))
        {
            pngExporter.Export(model, stream);
        }

        Console.WriteLine("正态分布图已生成:normal_distribution.png");
    }
}

说明:

  • 使用 LineSeries 绘制曲线。
  • 公式是标准正态分布概率密度函数: f(x)=1σ2πe−(x−μ)22σ2f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
  • 最终会生成一个 PNG 图片文件。