procedure TForm1.iplot_init();
begin
iPlot1.RemoveAllChannels; // 移除所有通道
iPlot1.RemoveAllXAxes; // 移除所有X轴
iPlot1.TitleText:='实时温度曲线'; // 设置曲线图的标题
//iPlot1.TitleVisible := False; // 不显示曲线图标题
iPlot1.YAxis[0].Span := 100; // 设置Y轴的显示范围
iPlot1.YAxis[0].Min:=-15; // 设置Y轴的起始值
iPlot1.YAxis[0].Title:='温度值(℃)'; // Y轴名称
iPlot1.YAxis[0].TitleShow:=True;
//---配置温度曲线---------------------------------------------------
iPlot1.AddChannel; // 添加一个曲线
iPlot1.Channel[0].TitleText := '温度'; // 设置曲线的名称
iPlot1.Channel[0].Color := clRed; // 设置曲线的颜色
// 曲线插值,加上下面这一句显示的曲线不会有棱角
iPlot1.Channel[0].InterpolationStyle := ipiSTCubicSpline;
iPlot1.Channel[0].TraceLineWidth := 2; // 曲线显示的宽度
iPlot1.AddXAxis; // 添加一个X轴
iPlot1.XAxis[0].Title:='采样时间(S)'; // X轴名称
iPlot1.XAxis[0].TitleShow:=True;
iPlot1.XAxis[0].Span := 200; // X轴显示范围
iPlot1.Channel[0].XAxisName := iPlot1.XAxis[0].Name;
iPlot1.XAxis[0].LabelsFont.Color := clRed; // 标签字体颜色
//---配置0刻度线---------------------------------------------------
iPlot1.AddChannel; // 添加一个曲线
iPlot1.Channel[1].TitleText := '0刻度'; // 设置曲线的名称
iPlot1.Channel[1].Color := clYellow; // 设置曲线的颜色
iPlot1.Channel[1].TraceLineWidth := 2; // 曲线显示的宽度
iPlot1.Channel[1].XAxisName := iPlot1.XAxis[0].Name;
//---配置峰值跟踪显示线---------------------------------------------------
iPlot1.AddChannel; // 添加一个曲线
iPlot1.Channel[2].TitleText := '峰值跟踪'; // 设置曲线的名称
iPlot1.Channel[2].Color := clBlue; // 设置曲线的颜色
iPlot1.Channel[2].TraceLineWidth := 2; // 曲线显示的宽度
iPlot1.Channel[2].XAxisName := iPlot1.XAxis[0].Name;
//---配置谷值跟踪显示线---------------------------------------------------
iPlot1.AddChannel; // 添加一个曲线
iPlot1.Channel[3].TitleText := '谷值跟踪'; // 设置曲线的名称
iPlot1.Channel[3].Color := clLime; // 设置曲线的颜色
iPlot1.Channel[3].TraceLineWidth := 2; // 曲线显示的宽度
iPlot1.Channel[3].XAxisName := iPlot1.XAxis[0].Name;
end;
iplot的操作
实时温度曲线绘制
最新推荐文章于 2024-10-15 13:28:58 发布
本文介绍了一个使用iPlot1组件初始化并配置实时温度曲线的过程。包括移除旧的通道和轴,设置新的Y轴范围和标题,添加不同颜色的温度曲线,并配置X轴的显示范围。
部署运行你感兴趣的模型镜像
您可能感兴趣的与本文相关的镜像
Stable-Diffusion-3.5
图片生成
Stable-Diffusion
Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率
3065

被折叠的 条评论
为什么被折叠?



