免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 822 | 回复: 0
打印 上一主题 下一主题

sample93.pl [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-04-16 01:24 |只看该作者 |倒序浏览

http://gdgraph.com/samples/sample93.html

sample93.plThis page contains information on the GD::Graph sample sample93.pl. The generated files are shown first, with the code used to generate the charts shown down below.
Use the left-hand navigation menu to view the other samples included in the GD::Graph package, or use the links at the top to view other sections of the website.
Generated Chartsample93.gif:

Code to generate these graphs:
use GD::Graph::pie;
require 'save.pl';
print STDERR "Processing sample93\n";
@data = (
[ qw( 1st 2nd 3rd 4th 5th 6th 7th ) ],
[ sort { $b  $a} (5.6, 2.1, 3.03, 4.05, 1.34, 0.2, 2.56) ]
);
$my_graph = new GD::Graph::pie( 200, 200 );
$my_graph->set(
start_angle => 90,
'3d' => 0,
label => 'Foo Bar',
# The following should prevent the 7th slice from getting a label
suppress_angle => 5,
transparent => 0,
);
$my_graph->plot(\@data);
save_chart($my_graph, 'sample93');


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/5591/showart_1901229.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP