您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php使用Jpgraph绘制简单X-Y坐标图的方法_PHP

2026/1/6 4:08:58发布13次查看
本文实例讲述了php使用jpgraph绘制简单x-y坐标图的方法。分享给大家供大家参考。具体实现方法如下:
setscale(textlin); //设置刻度样式 $graph->img->setmargin(30,30,80,30); //设置图表边界 $graph->title->set(year to date cost); //设置图表标题 // create the linear plot $lineplot=new lineplot($data); // 创建新的lineplot对象 $lineplot->setlegend(amount(m dollars)); //设置图例文字 $lineplot->setcolor(red); // 设置曲线的颜色 // add the plot to the graph $graph->add($lineplot); //在统计图上绘制曲线 // display the graph $graph->stroke(); //输出图像 ?>
运行后效果图如下:
希望本文所述对大家的php程序设计有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product