# getMinMax: Finds a Reasonable Domain for Plotting a Graph In fastGraph: Fast Drawing and Shading of Graphs of Statistical Distributions

## Description

This function computes a reasonable domain for plotting one, two, or three distribution functions by truncating small tail probabilities. This function also lists the population medians.

## Usage

 ```1 2``` ```getMinMax(xmin = NULL, xmax = NULL, distA, parmA1 = NULL, parmA2 = NULL, distB = NULL, parmB1 = NULL, parmB2 = NULL, distC = NULL, parmC1 = NULL, parmC2 = NULL) ```

## Arguments

 `xmin` A lower bound, usually set to `NULL` during input. `xmax` An upper bound, usually set to `NULL` during input. `distA` Character variable naming the first probability density function (starting with "d") or cumulative density function (starting with "p"). `parmA1` The first argument in `distA`, excluding the dummy argument. Alternatively, `parmA1` may be set to be a vector of arguments, excluding the dummy argument. `parmA2` The second argument in `distA`, excluding the dummy argument. Alternatively, `parmA2` may be set to be a vector of arguments, excluding the dummy argument and `parmA1`. `distB` Character variable naming the second probability density function (starting with "d") or cumulative density function (starting with "p"). `parmB1` The first argument in `distB`, excluding the dummy argument. Alternatively, `parmB1` may be set to be a vector of arguments, excluding the dummy argument. `parmB2` The second argument in `distB`, excluding the dummy argument. Alternatively, `parmB2` may be set to be a vector of arguments, excluding the dummy argument and `parmB1`. `distC` Character variable naming the third probability density function (starting with "d") or cumulative density function (starting with "p"). `parmC1` The first argument in `distC`, excluding the dummy argument. Alternatively, `parmC1` may be set to be a vector of arguments, excluding the dummy argument. `parmC2` The second argument in `distC`, excluding the dummy argument. Alternatively, `parmC2` may be set to be a vector of arguments, excluding the dummy argument and `parmC1`.

## Details

This function `getMinMax` is automatically called by `plotDist` and `shadeDist`, so the user does not actually need to directly call `getMinMax` when executing `plotDist` and `shadeDist`. This function by itself does not construct a graph.

## Value

 `xmin` A reasonable value of a lower bound for the domain of a graph. `xmax` A reasonable value of an upper bound for the domain of a graph. `medianA` The population median of `distA`. `medianB` The population median of `distB`. `medianC` The population median of `distC`.

## Author(s)

Steven T. Garren, James Madison University, Harrisonburg, Virginia, USA

`plotDist` and `shadeDist`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```getMinMax( , , "dnorm", 20, 5 ) # Normal(mu=20, sigma=5) # Standard normal, and t with 4 degrees of freedom getMinMax( , , "dnorm", 0, 1, "dt", 4, 0 ) # Standard normal, central t with 4 d.f., and t with 4 d.f. and non-centrality parmater = 1.2 getMinMax( , , "dnorm", 0, 1, "dt", 4, 0, "dt", 4, 1.2 ) # Force minimum to be -3. getMinMax( -3, , "dnorm", 0, 1 ) # Force maximum to be 3. getMinMax( , 3, "dnorm", 0, 1 ) ```