| Bsoft 2.0.5 Bernard's software package

Functions
bshow_graph.tcl File Reference

Procedures to draw graphs in Bshow. More...

Go to the source code of this file.

## Functions
| Histogram
| Draws a histogram of the image data. More...
| calcHistogram
| Calculates the histogram. More...
| Diffraction
| Dialog box to analyze diffraction patterns. More...
| setDiffOrigin w x y
| Sets the origin from canvas coordinates. More...
| updateOrigin w x y z
| Updates the origin. More...
| calcRadialAverage w plotdata findori
| Calculates the radial average of the first image. More...
| setupGraphVariables w
| Sets up the point position and limits variables in the window. More...
| plotGraph w plotdata type xlab ylab
| Plots the graph given specific limits. More...
| getLimits w plotdata
| Gets the limits from the input data. More...
| updateLimits w xmin xmax ymin ymax
| Updates the entry boxes for the plot limits. More...
| drawGraph w plotdata type xlab ylab
| Draws the graph when new data is read in. More...
| drawSubGraph w plotdata x1 y1 x2 y2 type xlab ylab
| Draws the graph when new data is read in. More...
| showPoint w plotdata x y
| Gets the limits from the input data. More...
| drawRectangle c x1 y1 x2 y2
| Draws a rectangle on the canvas. More...
| writePlotData plotdata
| Writes the plot data to a text file. More...

## Detailed Description

Procedures to draw graphs in Bshow.

Author
  Bernard Heymann

Date
  Created: 20010516
  Modified: 20141226

Definition in file bshow_graph.tcl.

## Function Documentation

## ◆ calcHistogram()

calcHistogram

Calculates the histogram.

Definition at line 109 of file bshow_graph.tcl.

## ◆ calcRadialAverage()

calcRadialAverage |  |  | w plotdata findori

Calculates the radial average of the first image.

Parameters

  w | Plot window object.
  plotdata | Array of data.
  findori | Flag to find diffraction origin

Definition at line 307 of file bshow_graph.tcl.

## ◆ Diffraction()

Diffraction

Dialog box to analyze diffraction patterns.

Definition at line 143 of file bshow_graph.tcl.

## ◆ drawGraph()

drawGraph |  |  | w plotdata type xlab ylab

Draws the graph when new data is read in.

Parameters

  w | Window object.
  plotdata | Array of data.
  type | Plot type.
  xlab |
  ylab | axis labels

Definition at line 556 of file bshow_graph.tcl.

## ◆ drawRectangle()

drawRectangle |  |  | c x1 y1 x2 y2

Draws a rectangle on the canvas.

Parameters

  c | Canvas object.
  x1 |
  y1 |
  x2 |
  y2 | Canvas coordinates of rectangle.

Definition at line 652 of file bshow_graph.tcl.

## ◆ drawSubGraph()

drawSubGraph |  |  | w plotdata x1 y1 x2 y2 type xlab ylab

Draws the graph when new data is read in.

Parameters

  w | Window object.
  plotdata | Array of data.
  x1 |
  y1 |
  x2 |
  y2 | Canvas coordinates of selected region
  type | Plot type.
  xlab |
  ylab | axis labels

Definition at line 574 of file bshow_graph.tcl.

## ◆ getLimits()

getLimits |  |  | w plotdata

Gets the limits from the input data.

Parameters

  w | Window object.
  plotdata | Array of data.

Definition at line 507 of file bshow_graph.tcl.

## ◆ Histogram()

Histogram

Draws a histogram of the image data.

Definition at line 19 of file bshow_graph.tcl.

## ◆ plotGraph()

plotGraph |  |  | w plotdata type xlab ylab

Plots the graph given specific limits.

Parameters

  w | Window object.
  plotdata | Array of data.
  type | type of graph (oval, bar, line)
  xlab |
  ylab | axis labels

Definition at line 394 of file bshow_graph.tcl.

## ◆ setDiffOrigin()

setDiffOrigin |  |  | w x y

Sets the origin from canvas coordinates.

Parameters

  w | Plot window object.
  x |
  y | Position in canvas coordinates.

Definition at line 246 of file bshow_graph.tcl.

## ◆ setupGraphVariables()

setupGraphVariables |  |  | w

Sets up the point position and limits variables in the window.

Parameters

  w | Window object.

Definition at line 361 of file bshow_graph.tcl.

## ◆ showPoint()

showPoint |  |  | w plotdata x y

Gets the limits from the input data.

Parameters

  w | Window object.
  plotdata | Array of data.
  x |
  y | Point coordinates in the window.

Definition at line 612 of file bshow_graph.tcl.

## ◆ updateLimits()

updateLimits |  |  | w xmin xmax ymin ymax

Updates the entry boxes for the plot limits.

Parameters

  w | Window object.
  xmin |
  xmax | x range.
  ymin |
  ymax | y range.

Definition at line 537 of file bshow_graph.tcl.

## ◆ updateOrigin()

updateOrigin |  |  | w x y z

Updates the origin.

Parameters

  w | Plot window object.
  x |
  y |
  z | Origin.

Definition at line 268 of file bshow_graph.tcl.

## ◆ writePlotData()

writePlotData |  |  | plotdata

Writes the plot data to a text file.

Parameters

  plotdata | Array of data.

Definition at line 661 of file bshow_graph.tcl.