<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>dobry den, muze mi nekdo poradit proc mi nechodi
script:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>hlasi mi to chybu na radce: <FONT
face="Courier New"><STRONG>my</STRONG> @x_vals = (<FONT color=#008000
size=2>0</FONT><FONT size=2>, </FONT><FONT color=#008000 size=2>10</FONT><FONT
size=2>, </FONT><FONT color=#008000 size=2>20</FONT><FONT size=2>, </FONT><FONT
color=#008000 size=2>30</FONT><FONT size=2>, </FONT><FONT color=#008000
size=2>40</FONT><FONT size=2>, </FONT><FONT color=#008000 size=2>50</FONT><FONT
size=2>, </FONT><FONT color=#008000 size=2>60</FONT><FONT size=2>); ??? vubec
nevim co s tim.</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><I><FONT face="Courier New" color=#000080 size=2>
<P>#! /usr/bin/perl -w<BR></I></FONT><FONT face="Courier New"
size=2><BR></FONT><FONT face="Courier New" size=2><B>use</B>
<B>strict</B>;<BR><B>use</B> GD;<BR><BR></FONT><I><FONT face="Courier New"
color=#000080 size=2># the data</I></FONT><FONT face="Courier New"
size=2><BR><B>my</B> @x_vals = (</FONT><FONT face="Courier New" color=#008000
size=2>0</FONT><FONT face="Courier New" size=2>, </FONT><FONT face="Courier New"
color=#008000 size=2>10</FONT><FONT face="Courier New" size=2>, </FONT><FONT
face="Courier New" color=#008000 size=2>20</FONT><FONT face="Courier New"
size=2>, </FONT><FONT face="Courier New" color=#008000 size=2>30</FONT><FONT
face="Courier New" size=2>, </FONT><FONT face="Courier New" color=#008000
size=2>40</FONT><FONT face="Courier New" size=2>, </FONT><FONT
face="Courier New" color=#008000 size=2>50</FONT><FONT face="Courier New"
size=2>, </FONT><FONT face="Courier New" color=#008000 size=2>60</FONT><FONT
face="Courier New" size=2>);<BR><B>my</B> @y_vals = (</FONT><FONT
face="Courier New" color=#008000 size=2>0.002</FONT><FONT face="Courier New"
size=2>, </FONT><FONT face="Courier New" color=#008000 size=2>0.045</FONT><FONT
face="Courier New" size=2>, </FONT><FONT face="Courier New" color=#008000
size=2>0.088</FONT><FONT face="Courier New" size=2>, </FONT><FONT
face="Courier New" color=#008000 size=2>0.132</FONT><FONT face="Courier New"
size=2>, </FONT><FONT face="Courier New" color=#008000 size=2>0.178</FONT><FONT
face="Courier New" size=2>, </FONT><FONT face="Courier New" color=#008000
size=2>0.215</FONT><FONT face="Courier New" size=2>, </FONT><FONT
face="Courier New" color=#008000 size=2>0.256</FONT><FONT face="Courier New"
size=2>);<BR><BR><BR></FONT><I><FONT face="Courier New" color=#000080 size=2>#
conversion factors</I></FONT><FONT face="Courier New" size=2><BR><B>my</B>
$x_pixels_per_unit = </FONT><FONT face="Courier New" color=#008000
size=2>10.0</FONT><FONT face="Courier New" size=2>;<BR><B>my</B>
$y_pixels_per_unit = </FONT><FONT face="Courier New" color=#008000
size=2>1167</FONT><FONT face="Courier New" size=2>;<BR><BR><BR>open GRFFILE,
</FONT><FONT face="Courier New" color=#800000
size=2>">/home/httpd/html/bios546/gd_graph.png"</FONT><FONT
face="Courier New" size=2> <B>or</B> die </FONT><FONT face="Courier New"
color=#800000 size=2>"Couldn't open graph file: $!\n"</FONT><FONT
face="Courier New" size=2>;<BR><BR></FONT><I><FONT face="Courier New"
color=#000080 size=2># create new image object</I></FONT><FONT
face="Courier New" size=2><BR><B>my</B> $im = new GD::Image(</FONT><FONT
face="Courier New" color=#008000 size=2>760</FONT><FONT face="Courier New"
size=2>, </FONT><FONT face="Courier New" color=#008000 size=2>420</FONT><FONT
face="Courier New" size=2>); </FONT><I><FONT face="Courier New" color=#000080
size=2><BR></I></FONT><FONT face="Courier New" size=2><BR></FONT><I><FONT
face="Courier New" color=#000080 size=2># allocate some colors</I></FONT><FONT
face="Courier New" size=2><BR><B>my</B> $white =
$im->colorAllocate(</FONT><FONT face="Courier New" color=#008000
size=2>255</FONT><FONT face="Courier New" size=2>,</FONT><FONT
face="Courier New" color=#008000 size=2>255</FONT><FONT face="Courier New"
size=2>,</FONT><FONT face="Courier New" color=#008000 size=2>255</FONT><FONT
face="Courier New" size=2>);<BR><B>my</B> $black =
$im->colorAllocate(</FONT><FONT face="Courier New" color=#008000
size=2>0</FONT><FONT face="Courier New" size=2>, </FONT><FONT face="Courier New"
color=#008000 size=2>0</FONT><FONT face="Courier New" size=2>, </FONT><FONT
face="Courier New" color=#008000 size=2>0</FONT><FONT face="Courier New"
size=2>);<BR><B>my</B> $red = $im->colorAllocate(</FONT><FONT
face="Courier New" color=#008000 size=2>255</FONT><FONT face="Courier New"
size=2>, </FONT><FONT face="Courier New" color=#008000 size=2>0</FONT><FONT
face="Courier New" size=2>, </FONT><FONT face="Courier New" color=#008000
size=2>0</FONT><FONT face="Courier New" size=2>);<BR><B>my</B> $blue =
$im->colorAllocate(</FONT><FONT face="Courier New" color=#008000
size=2>0</FONT><FONT face="Courier New" size=2>, </FONT><FONT face="Courier New"
color=#008000 size=2>0</FONT><FONT face="Courier New" size=2>, </FONT><FONT
face="Courier New" color=#008000 size=2>255</FONT><FONT face="Courier New"
size=2>);<BR><BR>$im->transparent($white);<BR>$im->interlaced(</FONT><FONT
face="Courier New" color=#800000 size=2>'true'</FONT><FONT face="Courier New"
size=2>);<BR><BR></FONT><I><FONT face="Courier New" color=#000080 size=2>#
border</I></FONT><FONT face="Courier New"
size=2><BR>$im->rectangle(</FONT><FONT face="Courier New" color=#008000
size=2>0</FONT><FONT face="Courier New" size=2>, </FONT><FONT face="Courier New"
color=#008000 size=2>0</FONT><FONT face="Courier New" size=2>, </FONT><FONT
face="Courier New" color=#008000 size=2>759</FONT><FONT face="Courier New"
size=2>, </FONT><FONT face="Courier New" color=#008000 size=2>419</FONT><FONT
face="Courier New" size=2>, $black);<BR><BR></FONT><I><FONT face="Courier New"
color=#000080 size=2>#axes</I></FONT><FONT face="Courier New"
size=2><BR><B>my</B> $x_axis_origin = </FONT><FONT face="Courier New"
color=#008000 size=2>50</FONT><FONT face="Courier New" size=2>;<BR><B>my</B>
$x_axis_end = </FONT><FONT face="Courier New" color=#008000
size=2>650</FONT><FONT face="Courier New" size=2>;<BR><B>my</B> $y_axis_origin =
</FONT><FONT face="Courier New" color=#008000 size=2>380</FONT><FONT
face="Courier New" size=2>;<BR><B>my</B> $y_axis_end = </FONT><FONT
face="Courier New" color=#008000 size=2>30</FONT><FONT face="Courier New"
size=2>;<BR><BR>$im->line($x_axis_origin, $y_axis_origin, $x_axis_end,
$y_axis_origin, $black); </FONT><I><FONT face="Courier New" color=#000080
size=2># x-axis</I></FONT><FONT face="Courier New"
size=2><BR>$im->string(gdSmallFont, </FONT><FONT face="Courier New"
color=#008000 size=2>300</FONT><FONT face="Courier New" size=2>, $y_axis_origin
+ </FONT><FONT face="Courier New" color=#008000 size=2>25</FONT><FONT
face="Courier New" size=2>, </FONT><FONT face="Courier New" color=#800000
size=2>"Time (min)"</FONT><FONT face="Courier New" size=2>, $black);
</FONT><I><FONT face="Courier New" color=#000080 size=2># axis
label<BR></I></FONT><FONT face="Courier New"
size=2><BR>$im->line($x_axis_origin, $y_axis_origin, $x_axis_origin,
$y_axis_end, $black); </FONT><I><FONT face="Courier New" color=#000080 size=2>#
y-axis</I></FONT><FONT face="Courier New"
size=2><BR>$im->stringUp(gdSmallFont, $x_axis_origin - </FONT><FONT
face="Courier New" color=#008000 size=2>45</FONT><FONT face="Courier New"
size=2>, </FONT><FONT face="Courier New" color=#008000 size=2>250</FONT><FONT
face="Courier New" size=2>, </FONT><FONT face="Courier New" color=#800000
size=2>"Enzyme Activity (units)"</FONT><FONT face="Courier New" size=2>,
$black);<BR><BR></FONT><I><FONT face="Courier New" color=#000080 size=2># tick
marks </FONT></I></P>
<P><I><FONT face="Courier New" color=#000080 size=2></I></FONT><FONT
face="Courier New" size=2><B>my</B> @x_ticks = (</FONT><FONT face="Courier New"
color=#008000 size=2>0</FONT><FONT face="Courier New" size=2>, </FONT><FONT
face="Courier New" color=#008000 size=2>10</FONT><FONT face="Courier New"
size=2>, </FONT><FONT face="Courier New" color=#008000 size=2>20</FONT><FONT
face="Courier New" size=2>, </FONT><FONT face="Courier New" color=#008000
size=2>30</FONT><FONT face="Courier New" size=2>, </FONT><FONT
face="Courier New" color=#008000 size=2>40</FONT><FONT face="Courier New"
size=2>, </FONT><FONT face="Courier New" color=#008000 size=2>50</FONT><FONT
face="Courier New" size=2>, </FONT><FONT face="Courier New" color=#008000
size=2>60</FONT><FONT face="Courier New" size=2>);<BR><B>foreach</B> <B>my</B>
$tick (@x_ticks) {<BR><B>my</B> $tick_pos = $tick * $x_pixels_per_unit +
$x_axis_origin;<BR>$im->line($tick_pos, $y_axis_origin - </FONT><FONT
face="Courier New" color=#008000 size=2>3</FONT><FONT face="Courier New"
size=2>, $tick_pos, $y_axis_origin + </FONT><FONT face="Courier New"
color=#008000 size=2>3</FONT><FONT face="Courier New" size=2>,
$black);<BR>$im->string(gdSmallFont, $tick_pos - </FONT><FONT
face="Courier New" color=#008000 size=2>5</FONT><FONT face="Courier New"
size=2>, $y_axis_origin + </FONT><FONT face="Courier New" color=#008000
size=2>10</FONT><FONT face="Courier New" size=2>, $tick,
$black);<BR>}<BR><BR><B>my</B> @y_ticks = qw(</FONT><FONT face="Courier New"
color=#008000 size=2>0.00</FONT><FONT face="Courier New" size=2> </FONT><FONT
face="Courier New" color=#008000 size=2>0.05</FONT><FONT face="Courier New"
size=2> </FONT><FONT face="Courier New" color=#008000 size=2>0.10</FONT><FONT
face="Courier New" size=2> </FONT><FONT face="Courier New" color=#008000
size=2>0.15</FONT><FONT face="Courier New" size=2> </FONT><FONT
face="Courier New" color=#008000 size=2>0.20</FONT><FONT face="Courier New"
size=2> </FONT><FONT face="Courier New" color=#008000 size=2>0.25</FONT><FONT
face="Courier New" size=2> </FONT><FONT face="Courier New" color=#008000
size=2>0.30</FONT><FONT face="Courier New" size=2>);<BR><B>foreach</B> <B>my</B>
$tick (@y_ticks) {<BR><B>my</B> $tick_pos = $y_axis_origin - $tick *
$y_pixels_per_unit;<BR>$im->line($x_axis_origin - </FONT><FONT
face="Courier New" color=#008000 size=2>3</FONT><FONT face="Courier New"
size=2>, $tick_pos, $x_axis_origin + </FONT><FONT face="Courier New"
color=#008000 size=2>3</FONT><FONT face="Courier New" size=2>, $tick_pos,
$black);<BR>$im->stringUp(gdSmallFont, $x_axis_origin - </FONT><FONT
face="Courier New" color=#008000 size=2>20</FONT><FONT face="Courier New"
size=2>, $tick_pos + </FONT><FONT face="Courier New" color=#008000
size=2>10</FONT><FONT face="Courier New" size=2>, $tick,
$black);<BR>}<BR><BR></FONT><I><FONT face="Courier New" color=#000080 size=2>#
data plotting</I></FONT><FONT face="Courier New" size=2><BR><B>for</B>
(<B>my</B> $i = </FONT><FONT face="Courier New" color=#008000
size=2>0</FONT><FONT face="Courier New" size=2>; $i <= $#x_vals; $i++)
{<BR><B>my</B> $x_pos = $x_vals[$i] * $x_pixels_per_unit +
$x_axis_origin;<BR><B>my</B> $y_pos = $y_axis_origin - $y_vals[$i] *
$y_pixels_per_unit;<BR>$im->string(gdSmallFont, $x_pos- </FONT><FONT
face="Courier New" color=#008000 size=2>2</FONT><FONT face="Courier New"
size=2>, $y_pos- </FONT><FONT face="Courier New" color=#008000
size=2>6</FONT><FONT face="Courier New" size=2>, </FONT><FONT face="Courier New"
color=#800000 size=2>"*"</FONT><FONT face="Courier New" size=2>,
$red);<BR>}<BR><BR></FONT><I><FONT face="Courier New" color=#000080 size=2>#
lines drawn between points</I></FONT><FONT face="Courier New"
size=2><BR><B>for</B> (<B>my</B> $i = </FONT><FONT face="Courier New"
color=#008000 size=2>0</FONT><FONT face="Courier New" size=2>; $i < $#x_vals;
$i++) {<BR><B>my</B> $x1 = $x_vals[$i] * $x_pixels_per_unit +
$x_axis_origin;<BR><B>my</B> $x2 = $x_vals[$i+</FONT><FONT face="Courier New"
color=#008000 size=2>1</FONT><FONT face="Courier New" size=2>] *
$x_pixels_per_unit + $x_axis_origin;<BR><BR><B>my</B> $y1 = $y_axis_origin -
$y_vals[$i] * $y_pixels_per_unit;<BR><B>my</B> $y2 = $y_axis_origin -
$y_vals[$i+</FONT><FONT face="Courier New" color=#008000 size=2>1</FONT><FONT
face="Courier New" size=2>] * $y_pixels_per_unit;<BR><BR>$im->line($x1, $y1,
$x2, $y2, $blue);<BR>}<BR><BR><BR></FONT><I><FONT face="Courier New"
color=#000080 size=2># print the file</I></FONT><FONT face="Courier New"
size=2><BR>binmode GRFFILE;<BR>print GRFFILE $im->png;<BR>close
GRFFILE;<BR></FONT></P><FONT face="Courier New" size=2><FONT
face=Arial></FONT></FONT></DIV>
<DIV><FONT face="Courier New" size=2><FONT face=Arial>predem dekuji za kazdou
pomoc</FONT></FONT></DIV>
<DIV><FONT face="Courier New" size=2><FONT face=Arial>Honza</FONT></DIV>
<P><BR><BR><BR><BR></P></FONT></BODY></HTML>