[LON-CAPA-users] click on image and gnuplot
H.K. Ng
lon-capa-users@mail.lon-capa.org
Mon, 11 Feb 2008 13:37:06 -0500
Hi, something like the script below will work. The point on the image
is specified by
<rectangle>(127,139)-(186,178)</rectangle>
which can be variables.
-hk
<problem><script type="loncapa/perl">
# Enter computations here
$A=2;
$x=0.9;
$exp=2;
$B=1;
</script>
<startouttext />Click at a point on the image. <endouttext />
<imageresponse max="1">
<foilgroup>
<foil name="foil1">
<image>
<gnuplot width="300" grid="on" align="left" height="300" font="large"
border="on" samples="100" fgcolor="x000000" bgcolor="xfff
fff" transparent="off" plottype="Cartesian" gridtype="Cartesian">
<axis color="x000000" ymax="100" ymin="1" xmax="10" xmin="1" />
<xlabel>Label X</xlabel>
<ylabel>Label Y</ylabel>
<curve linestyle="dots" color="x000000" pointtype="0"
linewidth="3" name="My Plot" limit="closed" pointsize="5">
<function>$A*x**$exp</function>
</curve>
</gnuplot>
</image>
<rectangle>(127,139)-(186,178)</rectangle>
</foil>
</foilgroup>
<hintgroup>
<startouttext />This is a hint. <endouttext />
</hintgroup>
</imageresponse>
</problem>
At 09:29 AM 2/11/2008, you wrote:
>Hallo,
>
>we would like to use click on image for plots, which are created via
>gnuplot.
>How can we solve this problem?
>
>Susanne Bellmer
>_______________________________________________
>LON-CAPA-users mailing list
>LON-CAPA-users@mail.lon-capa.org
>http://mail.lon-capa.org/mailman/listinfo/lon-capa-users