我采样得到一组300个左右的数据,请问怎么将它绘制成曲线呢。需要绘制到PictureBox或者Panel面板控件上。对GDI+绘图了解很少,还请各位给些方法,最好能给点实例。
0.0602
0.0767
0.0964
0.1195
0.1465
..........
0.2541
0.3000
0.3513
0.4084
0.4714
1.1993
1.3167
1.4390
1.5656
1.6960
0.0602
0.0767
0.0964
0.1195
0.1465
..........
0.2541
0.3000
0.3513
0.4084
0.4714
1.1993
1.3167
1.4390
1.5656
1.6960
解决方案 »
- 求匹配1到10的正则表达式
- 全屏截图 c#
- 未实例化对象?
- Socket如何解析XML100分!是解析!高人来啊!100分
- 关于C#中的Array.sort的问题
- string类型去除重复
- 请大家帮帮忙,帮我解决下!
- 谁有很好的方法实现数据库记录翻转,。net的不足?
- Request["Content"]得到是CX й?(原文是:CX 光电工业),请问这是什么编码,该如何解码?
- GetClassName这个API怎么用C#声明?
- 在局域网中怎样获得windows域服务器中用户ID和密码
- 怎么在bin\Debug的那个exe里打包大图片或者wmv声音文件,也就是说,只要有exe这个文件就可以播放声音,不需要读取本地文件了
Graphics gph = Graphics.FromImage(bMap);
gph.Clear(Color.White); PointF cPt = new PointF(50, 200);//坐标原点
PointF cPtbottomright = new PointF(690, 200);//
PointF cPtupleft = new PointF(50, 30);//
PointF cPtupright = new PointF(690, 30);//
gph.DrawString("宽巷模糊度变换情况", new Font("宋体", 10),
Brushes.Black, new PointF((cPt.X + cPtupright.X) / 2 - 40, cPtupleft.Y - 14));//图表标题
//画X轴
gph.DrawLine(Pens.Black, cPt.X, cPt.Y, cPtbottomright.X, cPtbottomright.Y);//下x轴
gph.DrawLine(Pens.Black, cPtupleft.X, cPtupleft.Y, cPtupright.X, cPtupright.Y);//上x轴 gph.DrawLine(Pens.Black, cPt.X, cPt.Y, cPtupleft.X, cPtupleft.Y);//左y轴
gph.DrawLine(Pens.Black, cPtbottomright.X, cPtbottomright.Y, cPtupright.X, cPtupright.Y);//右y轴 OBSrecord obs = new OBSrecord();
int i, j;
i = Convert.ToInt32(textBox5.Text);
maxwidelane = int.MinValue;
minwidelane = int.MaxValue; ;
for (j = 0; j < list.Count; j++)
{
obs = (OBSrecord)list[j];
if (obs.sv[i])
{
double N_ii = (Constants.f1 * obs.pseudorange_P1[i] + Constants.f2 * obs.pseudorange_P2[i]) / (Constants.f1 + Constants.f2) - (obs.pseudorange_L1[i] - obs.pseudorange_L2[i]) * Constants.speedoflight / (Constants.f1 - Constants.f2);
if (N_ii > maxwidelane)
maxwidelane = N_ii;
if (N_ii < minwidelane)
minwidelane = N_ii;
}
}
PointF ppt = new PointF();
PointF pt = new PointF();
ppt = cPt;
for (j = 0; j < list.Count; j++)
{
obs = (OBSrecord)list[j];
pt.X = cPt.X + (cPtbottomright.X - cPt.X) * j / list.Count;
if (obs.sv[i])
{
double N_ii = (Constants.f1 * obs.pseudorange_P1[i] + Constants.f2 * obs.pseudorange_P2[i]) / (Constants.f1 + Constants.f2) - (obs.pseudorange_L1[i] - obs.pseudorange_L2[i]) * Constants.speedoflight / (Constants.f1 - Constants.f2); pt.Y = cPt.Y - ((float)(N_ii) - (float)minwidelane) / ((float)maxwidelane - (float)minwidelane) * (cPt.Y - cPtupleft.Y);
}
else
pt.Y = ppt.Y;
gph.DrawLine(Pens.Red, ppt, pt);
ppt = pt;
}
this.pictureBox3.Image = bMap;
bmpsatellete = bMap;
b_widelane = true;
1.建立bitmap
2.用上bitmap建立graphics
3.用graphics的函数,和你的数据画图
4.picturebox.image=bimmap显示