<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_bshow__graph_8tcl">
<title>/Users/bernard/b20/bsoft/tcltk/bshow_graph.tcl File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/tcltk/bshow_graph.tcl</primary></indexterm>
<para>

<para>Procedures to draw graphs in Bshow. </para>
 
</para>
<simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para><link linkend="_bshow__graph_8tcl_1a0c9081a710491d9dfcf9ac746c34f719">Histogram</link></para>

<para>Draws a histogram of the image data. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1adf2f83f8aa060a503acd6fbc46dbe9fd">calcHistogram</link></para>

<para>Calculates the histogram. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1adca8de6ef2ec6da499839c6a47cb2b37">Diffraction</link></para>

<para>Dialog box to analyze diffraction patterns. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1a791bb3124d6441db1b52470c9a0b9b24">setDiffOrigin</link> w x y</para>

<para>Sets the origin from canvas coordinates. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1a25ff3d724fc6fef83f0528be89ca7897">updateOrigin</link> w x y z</para>

<para>Updates the origin. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1af06512f49c1b5c12d54649c32611ca36">calcRadialAverage</link> w plotdata findori</para>

<para>Calculates the radial average of the first image. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1a7995cf2ffe295ee996c22c302b028a12">setupGraphVariables</link> w</para>

<para>Sets up the point position and limits variables in the window. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1ac17f25940e8cf37fba75013c7d304d2e">plotGraph</link> w plotdata type xlab ylab</para>

<para>Plots the graph given specific limits. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1a4bc3ce863e51c0a186faa73400dae167">getLimits</link> w plotdata</para>

<para>Gets the limits from the input data. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1a9532d7d76d2d68059398473523a88c44">updateLimits</link> w xmin xmax ymin ymax</para>

<para>Updates the entry boxes for the plot limits. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1a68502bcc3f9bacadf11ef8e692d5f779">drawGraph</link> w plotdata type xlab ylab</para>

<para>Draws the graph when new data is read in. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1aa8b830da3c049ddc91761f11974ca540">drawSubGraph</link> w plotdata x1 y1 x2 y2 type xlab ylab</para>

<para>Draws the graph when new data is read in. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1a2ec38f22576080cba45a40e0b773f09d">showPoint</link> w plotdata x y</para>

<para>Gets the limits from the input data. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1abf4022f058809e37b70ce5514a76d5a9">drawRectangle</link> c x1 y1 x2 y2</para>

<para>Draws a rectangle on the canvas. </para>
</listitem>
            <listitem><para><link linkend="_bshow__graph_8tcl_1a6cba58890870a5eaa1862fe7c8473359">writePlotData</link> plotdata</para>

<para>Writes the plot data to a text file. </para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Procedures to draw graphs in Bshow. </para>

<para><formalpara><title>Author: </title>

<para>Bernard Heymann </para>
</formalpara>
<formalpara><title>Date: </title>

<para>Created: 20010516 </para>

<para>Modified: 20141226 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_bshow__graph_8tcl_1adf2f83f8aa060a503acd6fbc46dbe9fd"/>    <section>
    <title>calcHistogram()</title>
<indexterm><primary>calcHistogram</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>calcHistogram</secondary></indexterm>
<para><computeroutput>calcHistogram</computeroutput></para><para>

<para>Calculates the histogram. </para>
</para>
<para>
Definition at line 109 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1af06512f49c1b5c12d54649c32611ca36"/>    <section>
    <title>calcRadialAverage()</title>
<indexterm><primary>calcRadialAverage</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>calcRadialAverage</secondary></indexterm>
<para><computeroutput>calcRadialAverage w plotdata findori </computeroutput></para><para>

<para>Calculates the radial average of the first image. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>w</entry>
                                <entry>
<para>Plot window object. </para>
</entry>
                            </row>
                            <row>
                                <entry>plotdata</entry>
                                <entry>
<para>Array of data. </para>
</entry>
                            </row>
                            <row>
                                <entry>findori</entry>
                                <entry>
<para>Flag to find diffraction origin </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 307 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1adca8de6ef2ec6da499839c6a47cb2b37"/>    <section>
    <title>Diffraction()</title>
<indexterm><primary>Diffraction</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>Diffraction</secondary></indexterm>
<para><computeroutput>Diffraction</computeroutput></para><para>

<para>Dialog box to analyze diffraction patterns. </para>
</para>
<para>
Definition at line 143 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1a68502bcc3f9bacadf11ef8e692d5f779"/>    <section>
    <title>drawGraph()</title>
<indexterm><primary>drawGraph</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>drawGraph</secondary></indexterm>
<para><computeroutput>drawGraph w plotdata type xlab ylab </computeroutput></para><para>

<para>Draws the graph when new data is read in. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>w</entry>
                                <entry>
<para>Window object. </para>
</entry>
                            </row>
                            <row>
                                <entry>plotdata</entry>
                                <entry>
<para>Array of data. </para>
</entry>
                            </row>
                            <row>
                                <entry>type</entry>
                                <entry>
<para>Plot type. </para>
</entry>
                            </row>
                            <row>
                                <entry>xlab</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>ylab</entry>
                                <entry>
<para>axis labels </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 556 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1abf4022f058809e37b70ce5514a76d5a9"/>    <section>
    <title>drawRectangle()</title>
<indexterm><primary>drawRectangle</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>drawRectangle</secondary></indexterm>
<para><computeroutput>drawRectangle c x1 y1 x2 y2 </computeroutput></para><para>

<para>Draws a rectangle on the canvas. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>c</entry>
                                <entry>
<para>Canvas object. </para>
</entry>
                            </row>
                            <row>
                                <entry>x1</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>y1</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>x2</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>y2</entry>
                                <entry>
<para>Canvas coordinates of rectangle. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 652 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1aa8b830da3c049ddc91761f11974ca540"/>    <section>
    <title>drawSubGraph()</title>
<indexterm><primary>drawSubGraph</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>drawSubGraph</secondary></indexterm>
<para><computeroutput>drawSubGraph w plotdata x1 y1 x2 y2 type xlab ylab </computeroutput></para><para>

<para>Draws the graph when new data is read in. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>w</entry>
                                <entry>
<para>Window object. </para>
</entry>
                            </row>
                            <row>
                                <entry>plotdata</entry>
                                <entry>
<para>Array of data. </para>
</entry>
                            </row>
                            <row>
                                <entry>x1</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>y1</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>x2</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>y2</entry>
                                <entry>
<para>Canvas coordinates of selected region </para>
</entry>
                            </row>
                            <row>
                                <entry>type</entry>
                                <entry>
<para>Plot type. </para>
</entry>
                            </row>
                            <row>
                                <entry>xlab</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>ylab</entry>
                                <entry>
<para>axis labels </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 574 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1a4bc3ce863e51c0a186faa73400dae167"/>    <section>
    <title>getLimits()</title>
<indexterm><primary>getLimits</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>getLimits</secondary></indexterm>
<para><computeroutput>getLimits w plotdata </computeroutput></para><para>

<para>Gets the limits from the input data. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>w</entry>
                                <entry>
<para>Window object. </para>
</entry>
                            </row>
                            <row>
                                <entry>plotdata</entry>
                                <entry>
<para>Array of data. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 507 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1a0c9081a710491d9dfcf9ac746c34f719"/>    <section>
    <title>Histogram()</title>
<indexterm><primary>Histogram</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>Histogram</secondary></indexterm>
<para><computeroutput>Histogram</computeroutput></para><para>

<para>Draws a histogram of the image data. </para>
</para>
<para>
Definition at line 19 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1ac17f25940e8cf37fba75013c7d304d2e"/>    <section>
    <title>plotGraph()</title>
<indexterm><primary>plotGraph</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>plotGraph</secondary></indexterm>
<para><computeroutput>plotGraph w plotdata type xlab ylab </computeroutput></para><para>

<para>Plots the graph given specific limits. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>w</entry>
                                <entry>
<para>Window object. </para>
</entry>
                            </row>
                            <row>
                                <entry>plotdata</entry>
                                <entry>
<para>Array of data. </para>
</entry>
                            </row>
                            <row>
                                <entry>type</entry>
                                <entry>
<para>type of graph (oval, bar, line) </para>
</entry>
                            </row>
                            <row>
                                <entry>xlab</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>ylab</entry>
                                <entry>
<para>axis labels </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 394 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1a791bb3124d6441db1b52470c9a0b9b24"/>    <section>
    <title>setDiffOrigin()</title>
<indexterm><primary>setDiffOrigin</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>setDiffOrigin</secondary></indexterm>
<para><computeroutput>setDiffOrigin w x y </computeroutput></para><para>

<para>Sets the origin from canvas coordinates. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>w</entry>
                                <entry>
<para>Plot window object. </para>
</entry>
                            </row>
                            <row>
                                <entry>x</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>y</entry>
                                <entry>
<para>Position in canvas coordinates. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 246 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1a7995cf2ffe295ee996c22c302b028a12"/>    <section>
    <title>setupGraphVariables()</title>
<indexterm><primary>setupGraphVariables</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>setupGraphVariables</secondary></indexterm>
<para><computeroutput>setupGraphVariables w </computeroutput></para><para>

<para>Sets up the point position and limits variables in the window. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>w</entry>
                                <entry>
<para>Window object. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 361 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1a2ec38f22576080cba45a40e0b773f09d"/>    <section>
    <title>showPoint()</title>
<indexterm><primary>showPoint</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>showPoint</secondary></indexterm>
<para><computeroutput>showPoint w plotdata x y </computeroutput></para><para>

<para>Gets the limits from the input data. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>w</entry>
                                <entry>
<para>Window object. </para>
</entry>
                            </row>
                            <row>
                                <entry>plotdata</entry>
                                <entry>
<para>Array of data. </para>
</entry>
                            </row>
                            <row>
                                <entry>x</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>y</entry>
                                <entry>
<para>Point coordinates in the window. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 612 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1a9532d7d76d2d68059398473523a88c44"/>    <section>
    <title>updateLimits()</title>
<indexterm><primary>updateLimits</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>updateLimits</secondary></indexterm>
<para><computeroutput>updateLimits w xmin xmax ymin ymax </computeroutput></para><para>

<para>Updates the entry boxes for the plot limits. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>w</entry>
                                <entry>
<para>Window object. </para>
</entry>
                            </row>
                            <row>
                                <entry>xmin</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>xmax</entry>
                                <entry>
<para>x range. </para>
</entry>
                            </row>
                            <row>
                                <entry>ymin</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>ymax</entry>
                                <entry>
<para>y range. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 537 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1a25ff3d724fc6fef83f0528be89ca7897"/>    <section>
    <title>updateOrigin()</title>
<indexterm><primary>updateOrigin</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>updateOrigin</secondary></indexterm>
<para><computeroutput>updateOrigin w x y z </computeroutput></para><para>

<para>Updates the origin. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>w</entry>
                                <entry>
<para>Plot window object. </para>
</entry>
                            </row>
                            <row>
                                <entry>x</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>y</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>z</entry>
                                <entry>
<para>Origin. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 268 of file bshow_graph.tcl.</para>
    </section><anchor xml:id="_bshow__graph_8tcl_1a6cba58890870a5eaa1862fe7c8473359"/>    <section>
    <title>writePlotData()</title>
<indexterm><primary>writePlotData</primary><secondary>bshow_graph.tcl</secondary></indexterm>
<indexterm><primary>bshow_graph.tcl</primary><secondary>writePlotData</secondary></indexterm>
<para><computeroutput>writePlotData plotdata </computeroutput></para><para>

<para>Writes the plot data to a text file. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>plotdata</entry>
                                <entry>
<para>Array of data. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 661 of file bshow_graph.tcl.</para>
</section>
</section>
</section>
