如何在c#.net中为3点创建折线图 [英] how to create line chart for 3 points in c#.net

查看:75
本文介绍了如何在c#.net中为3点创建折线图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在c#.net Windows应用程序中为2个以上的点创建折线图.谁能帮忙

I would like to create line chart for more than 2 points in c#.net windows application. Can anyone help

推荐答案

Zedgraph 是一个非常好的图表库,用于在Windows应用程序中绘制图表.此代码项目文章
中对此进行了解释 .NET的灵活图表库 [
The Zedgraph is a very good charting library for drawing charts in Windows application. It is explained here in this Code Project article
A flexible charting library for .NET[^] by JChampion with several examples.

I think it may be helpful.


从我链接到的网站上获取最高系数:

Take the top coefficients from the website I linked to:

// For np = 5 = 5 data points
var h = 35.0;
var coeff = new float[] { 17, 12, -3 }; // coefficients from the site
var easyCoeff = new float[] {-3, 12, 17, 12, -3}; // Its symmetrical
var center = 2; // = the center of the easyCoeff array
// now for every point from your data you calculate a smoothed point:

smoothed[x] = 
   ((data[x - 2] * easyCoeff[center - 2]) +
    (data[x - 1] * easyCoeff[center - 1]) +
    (data[x - 0] * easyCoeff[center - 0]) +
    (data[x + 1] * easyCoeff[center + 1]) +
    (data[x + 2] * easyCoeff[center + 2])) / h;


使用5个点时,前2个点和后2个点将无法平滑.


The first 2 and last 2 points you cannoth smooth when using 5 points.


这篇关于如何在c#.net中为3点创建折线图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆