sbekman 00/08/08 08:19:41 Modified: . index.html netcraft graph.pl index.html input.data Added: netcraft graph.jpg logo-middle.png logo.png pseudo-graph.jpg Removed: netcraft graph.gif logo-middle.gif logo.gif pseudo-graph.gif Log: time to move from gif to png, but png is not yet supported by all browsers, hence I cannot use it. But since my gd library doesn't support gif anymore and I don't want to install the old library. I've modified the script to create jpegs instead. They are somewhat bigger than gif or png, but for a time being I'll stick to these. Next step is to move completely to PNG. Nevertheless mod_perl rules! 1.3M hosts!!! PR: Revision Changes Path 1.63 +1 -1 modperl-site/index.html Index: index.html =================================================================== RCS file: /home/cvs/modperl-site/index.html,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- index.html 2000/07/11 00:58:14 1.62 +++ index.html 2000/08/08 15:19:29 1.63 @@ -758,7 +758,7 @@ <center> <a href="netcraft/"> - <img src="netcraft/pseudo-graph.gif" height=200 + <img src="netcraft/pseudo-graph.jpg" height=200 width=350 border=0 alt="mod_perl usage graph"></a> </center> 1.3 +16 -8 modperl-site/netcraft/graph.pl Index: graph.pl =================================================================== RCS file: /home/cvs/modperl-site/netcraft/graph.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- graph.pl 1999/08/14 11:42:38 1.2 +++ graph.pl 2000/08/08 15:19:34 1.3 @@ -15,14 +15,14 @@ # with no other labels, but y axis. This graph should be linked to a # bigger one (graph.gif) # -# Note: you need GIFgraph package to be installed in order to use this +# Note: you need GD::Graph package to be installed in order to use this # script. # Copyrighted under GPL license # by Stas Bekman <[EMAIL PROTECTED]> # Aug, 14 1999 -use GIFgraph::linespoints; +use GD::Graph::linespoints; use strict; print STDERR "Processing data\n"; @@ -44,7 +44,7 @@ # plot a normal graph of points with all the info as possible sub normal_graph{ - my $my_graph = new GIFgraph::linespoints(700,400); + my $my_graph = new GD::Graph::linespoints(700,400); $my_graph->set( x_label => 'Months', @@ -64,7 +64,7 @@ r_margin => 10, two_axes => 1, - logo => 'logo.gif', + logo => 'logo.png', logo_position => 'LL', ); @@ -79,13 +79,17 @@ $my_graph->set_legend('Hostnames','Unique IP numbers' ); $my_graph->set_legend_font(GD::gdMediumBoldFont); - $my_graph->plot_to_gif( "graph.gif", \@data ); + open IMG, '>graph.jpg' or die $!; + print IMG $my_graph->plot(\@data)->jpeg(70); + close IMG; +# $my_graph->plot_to_gif( "graph.gif", \@data ); + } # plot a small graph of points with as least info as possible sub pseudo_graph{ - my $my_graph = new GIFgraph::linespoints(350,200); + my $my_graph = new GD::Graph::linespoints(350,200); # in this graph we don't want X labels to be printed for (0..$#{$data[0]}) { @@ -107,7 +111,7 @@ r_margin => 10, two_axes => 0, - logo => 'logo-middle.gif', + logo => 'logo-middle.png', logo_position => 'UL', ); @@ -121,8 +125,12 @@ $my_graph->set_legend('Hostnames','Unique IP numbers' ); $my_graph->set_legend_font(GD::gdSmallFont); + - $my_graph->plot_to_gif( "pseudo-graph.gif", \@data ); + open IMG, '>pseudo-graph.jpg' or die $!; + print IMG $my_graph->plot(\@data)->jpeg(70); + close IMG; + #$my_graph->plot_to_gif( "pseudo-graph.gif", \@data ); } 1.27 +3 -2 modperl-site/netcraft/index.html Index: index.html =================================================================== RCS file: /home/cvs/modperl-site/netcraft/index.html,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- index.html 2000/07/12 00:58:53 1.26 +++ index.html 2000/08/08 15:19:35 1.27 @@ -19,7 +19,7 @@ <p> <hr> -<IMG SRC="graph.gif" HEIGHT=400 WIDTH=700 BORDER=0 ALT="Graph"> +<IMG SRC="graph.jpg" HEIGHT=400 WIDTH=700 BORDER=0 ALT="Graph"> <BR> <BR> The <A HREF="graph.pl"> script </A> that produced this graph and the <A HREF="input.data"> @@ -36,7 +36,8 @@ <p> <table cellpadding=3 border=1> <tr><td>Survey</td><td>hostnames</td><td>unique ip addresses</td></tr> -<tr><td> June 2000 </td><td>1080206</td><td>123008</td></tr> +<tr><td> July 2000 </td><td>1286714</td><td>132940</td></tr> +<tr><td> June 2000 </td><td>1080206</td><td>123008</td></tr> <tr><td> May 2000 </td><td>852675</td><td>108327</td></tr> <tr><td> April 2000 </td><td>736805</td><td>95994</td></tr> <tr><td> March 2000 </td><td>612425</td><td>85749</td></tr> 1.14 +1 -0 modperl-site/netcraft/input.data Index: input.data =================================================================== RCS file: /home/cvs/modperl-site/netcraft/input.data,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- input.data 2000/07/12 00:58:53 1.13 +++ input.data 2000/08/08 15:19:36 1.14 @@ -1,3 +1,4 @@ +July 2000 1286714 132940 June 2000 1080206 123008 May 2000 852675 108327 April 2000 736805 95994 1.1 modperl-site/netcraft/graph.jpg <<Binary file>> 1.1 modperl-site/netcraft/logo-middle.png <<Binary file>> 1.1 modperl-site/netcraft/logo.png <<Binary file>> 1.1 modperl-site/netcraft/pseudo-graph.jpg <<Binary file>>