[rkward-cvs] rkward/rkward/plugins/plots box_plot.php,NONE,1.1 box_plot.xml,NONE,1.1 histogram.php,NONE,1.1 histogram.xml,NONE,1.1

Thomas Friedrichsmeier tfry at users.sourceforge.net
Sun Mar 12 18:48:28 UTC 2006


Update of /cvsroot/rkward/rkward/rkward/plugins/plots
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29050/plots

Added Files:
	box_plot.php box_plot.xml histogram.php histogram.xml 
Log Message:
Adding plot plugins by Stefan Roediger

--- NEW FILE: histogram.php ---
<?
	function preprocess () {
	}
	
	function calculate () {
?>
rk.temp.date = date()
<?
	}
	
	function printout () {
?>cat ("<h1>Histogram</h1>")
rk.graph.on ()
plot (hist (<? getRK ("x"); ?>, freq = <? getRK ("scale"); ?>))
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)
<?
	}
?>

--- NEW FILE: histogram.xml ---
<!DOCTYPE rkplugin>
<document>
  <code file="histogram.php" />
  <dialog label="Histogram" >
    <tabbook>
      <tab label="Variable(s)" >
        <row>
          <varselector id="vars" />
          <varslot multi="false" type="numeric" id="x" source="vars" label="variable(s):" required="true" />
        </row>
      </tab>
      <tab label="Options" >
        <column>
          <radio id="scale" label="Scale" >
            <option value="FALSE" label="No Frequency" />
            <option value="TRUE" label="Frequency" />
          </radio>
          <column>
            <checkbox value_unchecked="0" checked="false" value="1" id="rug" label="Rug" />
            <checkbox value_unchecked="0" checked="false" value="1" id="jitter" label="Jitter" />
          </column>
        </column>
      </tab>
    </tabbook>
  </dialog>
</document>

--- NEW FILE: box_plot.xml ---
<!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>

--- NEW FILE: box_plot.php ---
<?
	function preprocess () {
	}
	
	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)
<?
	}
?>





More information about the rkward-tracker mailing list