[rkward-cvs] rkward/rkward/plugins/plots box_plot.php,1.1,1.2 box_plot.xml,1.1,1.2 histogram.php,1.2,1.3
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Wed Apr 5 15:03:33 UTC 2006
Update of /cvsroot/rkward/rkward/rkward/plugins/plots
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27802/plots
Modified Files:
box_plot.php box_plot.xml histogram.php
Log Message:
Clean up histogram and boxplot. Add plot options to boxplot
Index: histogram.php
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugins/plots/histogram.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** histogram.php 20 Mar 2006 19:33:58 -0000 1.2
--- histogram.php 5 Apr 2006 15:03:30 -0000 1.3
***************
*** 4,27 ****
function calculate () {
- ?>
- rk.temp.date = date()
- <?
}
function printout () {
! ?>cat ("<h1>Histogram</h1>")
rk.graph.on ()
plot (hist (<? getRK ("x"); ?>, freq = <? getRK ("scale"); ?>)<? getRK ("plotoptions.code.printout"); ?>)
rk.graph.off ()
- cat ("<table border = \"1\">")
- cat ("<TR><TD>Created</TD><TD> ", rk.temp.date," </TD></TR>")
- cat ("<TR><TD>Frequency</TD><TD><? getRK ("scale"); ?></TD></TR>")
- cat ("</table>")
<?
}
function cleanup () {
- ?>rm (rk.temp.date)
- <?
}
?>
--- 4,20 ----
function calculate () {
}
function printout () {
! ?>
! rk.header ("Histogram", list ("Frequency", "<? getRK ("scale"); ?>"))
! cat ("<h1>Histogram</h1>")
rk.graph.on ()
plot (hist (<? getRK ("x"); ?>, freq = <? getRK ("scale"); ?>)<? getRK ("plotoptions.code.printout"); ?>)
rk.graph.off ()
<?
}
function cleanup () {
}
?>
Index: box_plot.xml
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugins/plots/box_plot.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** box_plot.xml 12 Mar 2006 18:48:26 -0000 1.1
--- box_plot.xml 5 Apr 2006 15:03:30 -0000 1.2
***************
*** 1,41 ****
<!DOCTYPE rkplugin>
<document>
! <code file="box_plot.php" />
! <dialog label="Boxplot" >
! <tabbook>
! <tab label="Variable(s)" >
! <row>
! <varselector id="vars" />
! <varslot multi="false" type="numeric" source="vars" id="x" label="variable(s):" required="true" />
! </row>
! </tab>
! <tab label="Options" >
! <row>
! <column>
! <radio id="notch" label="Notch" >
! <option value="TRUE" label="True" />
! <option checked="true" value="FALSE" label="False" />
! </radio>
! <radio id="orientation" label="orientation" >
! <option value="TRUE" label="horizontal" />
! <option checked="true" value="FALSE" label="vertical" />
! </radio>
! <radio id="outline" label="Outline" >
! <option value="TRUE" label="True" />
! <option checked="true" value="FALSE" label="False" />
! </radio>
! </column>
! <row>
! <checkbox value_unchecked="0" checked="false" value="1" id="x.scale" label="X-Scale" />
! <checkbox value_unchecked="0" checked="false" value="1" id="y.scale" label="Y-Scale" />
! </row>
! </row>
! <row>
! <frame id="use" label="Define Histogram" >
! <checkbox value_unchecked="0" checked="false" value="1" id="" label="" />
! </frame>
! </row>
! </tab>
! </tabbook>
! </dialog>
</document>
--- 1,46 ----
<!DOCTYPE rkplugin>
<document>
! <code file="box_plot.php" />
! <logic>
! <connect client="plotoptions.xvar" governor="x.available"/>
! <set id="plotoptions.allow_type" to="false"/>
! </logic>
! <dialog label="Boxplot" >
! <tabbook>
! <tab label="Variable(s)" >
! <row>
! <varselector id="vars" />
! <varslot multi="false" type="numeric" source="vars" id="x" label="variable(s):" required="true" />
! </row>
! </tab>
! <tab label="Options" >
! <row>
! <column>
! <radio id="notch" label="Notch" >
! <option value="TRUE" label="True" />
! <option checked="true" value="FALSE" label="False" />
! </radio>
! <radio id="orientation" label="orientation" >
! <option value="TRUE" label="horizontal" />
! <option checked="true" value="FALSE" label="vertical" />
! </radio>
! <radio id="outline" label="Outline" >
! <option value="TRUE" label="True" />
! <option checked="true" value="FALSE" label="False" />
! </radio>
! </column>
! <column>
! <row>
! <checkbox value_unchecked="0" checked="false" value="1" id="x.scale" label="X-Scale" />
! <checkbox value_unchecked="0" checked="false" value="1" id="y.scale" label="Y-Scale" />
! </row>
! <checkbox value_unchecked="0" checked="false" value="1" id="use" label="Define Histogram" />
! <stretch/>
! <embed id="plotoptions" component="rkward::plot_options" as_button="true" label="Plot Options" />
! <stretch/>
! </column>
! </row>
! </tab>
! </tabbook>
! </dialog>
</document>
Index: box_plot.php
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugins/plots/box_plot.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** box_plot.php 12 Mar 2006 18:48:26 -0000 1.1
--- box_plot.php 5 Apr 2006 15:03:30 -0000 1.2
***************
*** 4,32 ****
function calculate () {
- ?>rk.tmp.x <- boxplot (<? getRK ("x"); ?>, notch = <? getRK ("notch") ?>, outline = <? getRK("outline")?>, horizontal = <? getRK("orientation") ?>)
- <?
}
function printout () {
! $xlabel = getRK_val ("x.label")
!
?>
rk.graph.on()
! cat ("<h1>Boxplot</h1>")
! cat ("<h2><? getRK (x.label); ?></h2>")
! cat ("<table align="center" frame="above">
! <tbody>
! <tr>
! <td>cat (deparse (rk.tmp.x))</td>
! </tr>
! </tbody>
! </table>")
!
<?
}
function cleanup () {
- ?>rm (rk.tmp.x)
- <?
}
?>
--- 4,20 ----
function calculate () {
}
function printout () {
! $x = getRK_val ("x");
?>
+ rk.header ("Boxplot", list ("Variable", rk.get.description (<? echo ($x); ?>)))
rk.graph.on()
! boxplot (<? echo ($x); ?>, notch = <? getRK ("notch") ?>, outline = <? getRK("outline")?>, horizontal = <? getRK("orientation") ?><? getRK ("plotoptions.code.printout"); ?>)
! rk.graph.off ()
<?
}
function cleanup () {
}
?>
More information about the rkward-tracker
mailing list