File:
[LON-CAPA] /
loncom /
homework /
templates /
Plot_data.problem
Revision
1.5:
download - view:
text,
annotated -
select for diffs
Mon Jul 6 17:12:47 2009 UTC (15 years ago) by
bisitz
Branches:
MAIN
CVS tags:
version_2_9_99_0,
bz6209-base,
bz6209,
bz2851,
PRINT_INCOMPLETE_base,
PRINT_INCOMPLETE,
HEAD,
GCI_3
Consistent problem templates:
- New line after each tag (not for texts in foils)
- One empty row after each end tag and before new start tag for second level tags
- No indentation for second level tags, e.g. <script>
- Four white spaces as indentation for each further sub level
Exceptions:
-Content (mostly text) in separate line(s): no indentation
- Concept groups: same indentation as foilgroup
(allows to insert code from problems without concept groups without changing the indentation and vice versa)
- No new line at end of template
- Removed new lines from within the middle of default texts
- Added one blank each after "<m>$" and before "$</m>" to ensure no misinterpretation neither by human nor by machine (e.g. "<m>$x" is not "<m>$ $x")
- Replaced deprecated font tag in <instructorcomment> by CSS
- Removed dos line endings
- dos2unix conversion
(ClickImageExample.problem, RandomLabelExample.problem, SimpleMatching.problem)
<problem>
<script type="loncapa/perl">
$amplitude = &random(1,4,0.5);
$x_min = -5;
$x_max = 5;
for ($x=$x_min;$x<=$x_max;$x=$x+0.05) {
push(@X,$x);
push(@Y,$amplitude*sin($x));
}
</script>
<gnuplot width="300" transparent="off" samples="100" grid="on" font="9" bgcolor="xffffff" height="300" align="left" fgcolor="x000000" border="on" plottype="Cartesian" >
<axis xmin="$x_min" ymin="-5" xmax="$x_max" ymax="5" color="x000000" />
<xlabel>Label X</xlabel>
<ylabel>Label Y</ylabel>
<curve linestyle="linespoints" name="My Plot" pointtype="0" color="x000000">
<data>@X</data>
<data>@Y</data>
</curve>
</gnuplot>
<startouttext />
What is the amplitude of this function?
<endouttext />
<numericalresponse answer="$amplitude" format="2s">
<responseparam name="tol" type="tolerance" description="Numerical Tolerance" default="5%" />
<textline readonly="no" />
</numericalresponse>
</problem>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>