Annotation of loncom/homework/templates/Plot_data.problem, revision 1.5

1.1       matthew     1: <problem>
                      2: 
                      3: <script type="loncapa/perl">
1.4       www         4: $amplitude = &random(1,4,0.5);
                      5: $x_min = -5;
                      6: $x_max =  5;
                      7: for ($x=$x_min;$x<=$x_max;$x=$x+0.05) {
                      8:    push(@X,$x);
                      9:    push(@Y,$amplitude*sin($x));
                     10: }
1.1       matthew    11: </script>
                     12: 
1.3       albertel   13: <gnuplot width="300" transparent="off" samples="100" grid="on" font="9" bgcolor="xffffff" height="300" align="left" fgcolor="x000000" border="on" plottype="Cartesian" >
1.4       www        14:     <axis xmin="$x_min" ymin="-5" xmax="$x_max" ymax="5" color="x000000" />
1.1       matthew    15:     <xlabel>Label X</xlabel>
                     16:     <ylabel>Label Y</ylabel>
                     17:     <curve linestyle="linespoints" name="My Plot" pointtype="0" color="x000000">
1.4       www        18:         <data>@X</data>
                     19:         <data>@Y</data>
1.1       matthew    20:     </curve>
                     21: </gnuplot>
                     22: 
1.5     ! bisitz     23: <startouttext />
        !            24: What is the amplitude of this function?
        !            25: <endouttext />
1.1       matthew    26: 
1.4       www        27: <numericalresponse answer="$amplitude" format="2s">
1.1       matthew    28:     <responseparam name="tol" type="tolerance" description="Numerical Tolerance" default="5%" />
1.4       www        29:     <textline readonly="no" />
1.5     ! bisitz     30: </numericalresponse>
1.4       www        31: 
1.1       matthew    32: </problem>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>