plotTS {oce} | R Documentation

## Plot temperature-salinity diagram

### Description

Plot temperature-salinity diagram for seawater (CTD) data.

### Usage

    plotTS(x,
        inSitu=FALSE,
        type="p",
        referencePressure=0,
        nlevels=6, levels,
        grid=TRUE,
        col.grid="lightgray",
        lty.grid="dotted",
        rho1000=FALSE,
        eos=getOption("oceEOS", default='gsw'),
        cex=par("cex"), col=par("col"), pch=par("pch"),
        bg, pt.bg="transparent",
        col.rho="darkgray",
        cex.rho=3/4*par("cex"),
        rotate=TRUE,
        useSmoothScatter=FALSE,
        xlab,
        ylab,
        Slim,
        Tlim,
        mgp=getOption("oceMgp"),
        mar=c(mgp[1]+1.5,mgp[1]+1.5,mgp[1],mgp[1]),
        lwd=par('lwd'), lty=par('lty'),
        lwd.rho=par("lwd"), lty.rho=par("lty"),
        add=FALSE, inset=FALSE,
        debug=getOption("oceDebug"),
        ...)

### Arguments

`x` | An object containing salinity and temperature data, typically a `ctd` object or `section` object.
`inSitu` | A boolean indicating whether to use in-situ temperature or (the default) potential temperature, calculated with reference pressure given by `referencePressure`. This is ignored if `eos="gsw"`, because those cases the y axis is necessarily the conservative formulation of temperature.
`type` | representation of data, `"p"` for points, `"l"` for connecting lines, or `"n"` for no indication.
`referencePressure` | reference pressure, to be used in calculating potential temperature, if `inSitu` is `FALSE`.
`nlevels` | Number of automatically-selected isopycnal levels (ignored if `levels` is supplied).
`levels` | Optional vector of desired isopycnal levels.
`grid` | a flag that can be set to `TRUE` to get a grid.
`col.grid` | colour for grid.
`lty.grid` | line type for grid.
`rho1000` | if TRUE, label isopycnals as e.g. 1024; if FALSE, label as e.g. 24
`eos` | equation of state to be used, either `"unesco"` or `"gsw"`.
`cex` | character-expansion factor for symbols, as in `par("cex")`.
`pch` | symbol type, as in `par("pch")`.
`bg` | optional colour to be painted under plotting area, before plotting. (This is useful for cases in which `inset=TRUE`.)
`pt.bg` | inside colour for symbols with `pch` in 21:25
`col` | colour for symbols.
`col.rho` | colour for isopycnal lines.
`cex.rho` | size of isopycnal labels.
`rotate` | if TRUE, labels in right-hand margin are written vertically
`useSmoothScatter` | if TRUE, use `smoothScatter` to plot the points.
`xlab` | optional label for the x axis, with default "Salinity [PSU]".
`ylab` | optional label for the y axis, with default "Temperature [C]".
`Slim` | optional limits for salinity axis, otherwise inferred from data.
`Tlim` | optional limits for temperature axis, otherwise inferred from data.
`mgp` | 3-element numerical vector to use for `par(mgp)`, and also for `par(mar)`, computed from this. The default is tighter than the R default, in order to use more space for the data and less for the axes.
`mar` | value to be used with `par("mar")`. If set to `NULL`, then `par("mar")` is used. A good choice for a TS diagram with a palette to the right is `mar=par("mar")+c(0, 0, 0, 1))`.
`lwd` | line width of lines or symbols.
`lty` | line type of lines or symbols.
`lwd.rho` | line width for density curves.
`lty.rho` | line type for density curves.
`add` | a flag that controls whether to add to an existing plot. (It makes sense to use `add=TRUE` in the `panel` argument of a `coplot`, for example.)
`inset` | set to `TRUE` for use within `plotInset`. The effect is to prevent the present function from adjusting margins, which is necessary because margin adjustment is the basis for the method used by `plotInset`.
`debug` | a flag that turns on debugging. Set to 1 to get a moderate amount of debugging information, or to 2 to get more.
`...` | optional arguments passed to plotting functions.

### Details

Creates a temperature-salinity plot for a CTD cast, with labeled isopycnals.

### Value

A list is silently returned, containing `xat` and `yat`, values that can be used by `oce.grid` to add a grid to the plot.

### Author(s)

Dan Kelley

### See Also

`summary.ctd` summarizes the information, while `read.ctd` scans it from a file.

### Examples

    library(oce)
    data(ctd)
    plotTS(ctd)

[Package oce version 0.9-18 Index]