Plots Level

broken image
Simple story plotlines

Level plots and contour plots

Description

Draws false color level plots and contour plots.

Usage

Arguments

x

for the formula method, a formula of the form z ~ x * y | g1 * g2 * .., where z is a numeric response, andx, y are numeric values evaluated on a rectangulargrid. g1, g2, .. are optional conditional variables, andmust be either factors or shingles if present.

Calculations are based on the assumption that all x and y values areevaluated on a grid (defined by their unique values). The functionwill not return an error if this is not true, but the display mightnot be meaningful. However, the x and y values need not be equallyspaced.

Both levelplot and wireframe have methods formatrix, array, and table objects, in which casex provides the z vector described above, while itsrows and columns are interpreted as the x and yvectors respectively. This is similar to the form used infilled.contour and image. For higher-dimensionalarrays and tables, further dimensions are used as conditioningvariables. Note that the dimnames may be duplicated; this ishandled by calling make.unique to make the namesunique (although the original labels are used for the x- andy-axes).

data

For the formula methods, an optional data frame in whichvariables in the formula (as well as groups andsubset, if any) are to be evaluated. Usually ignored with awarning in other cases.

row.values, column.values

Optional vectors of values thatdefine the grid when x is a matrix. row.values andcolumn.values must have the same lengths as nrow(x)and ncol(x) respectively. By default, row and columnnumbers.

Casio 3230 battery. Casio watch module: 3230 Battery type: CR2016 Battery price: 6$ average Amazon price. We may earn a commission on qualifying purchases from our links to Amazon Compatiable with watches: DW-6900, W.

panel

panel function used to create the display, as described inxyplot

aspect

For the matrix methods, the default aspect ratio is chosen tomake each cell square. The usual default is aspect='fill',as described in xyplot.

at

A numeric vector giving breakpoints along the range ofz. Contours (if any) will be drawn at these heights, and theregions in between would be colored using col.regions. Inthe latter case, values outside the range of at will not bedrawn at all. This serves as a way to limit the range of the datashown, similar to what a zlim argument might have been usedfor. However, this also means that when supplying atexplicitly, one has to be careful to include values outside therange of z to ensure that all the data are shown.

at can have length one only if region=FALSE.

col.regions

color vector to be used if regions is TRUE. Thegeneral idea is that this should be a color vector of moderatelylarge length (longer than the number of regions. By default this is100). It is expected that this vector would be gradually varying incolor (so that nearby colors would be similar). When the colors areactually chosen, they are chosen to be equally spaced along thisvector. When there are more regions than colors incol.regions, the colors are recycled. The actual colorassignment is performed by level.colors, which isdocumented separately.

alpha.regions

numeric, specifying alpha transparency (works only on some devices)

colorkey

logical specifying whether a color key is to be drawnalongside the plot, or a list describing the color key. The list maycontain the following components:

space:

location of the colorkey, can be one of 'left','right', 'top' and 'bottom'. Defaults to'right'.

x, y:

location, currently unused

col:

A color ramp specification, as in the col.regionsargument in level.colors

at:

numeric vector specifying where the colors change. must be oflength 1 more than the col vector.

tri.lower, tri.upper:

Logical or numeric controlling whether the first and lastintervals should be triangular instead of rectangular. With thedefault value (NA), this happens only if thecorresponding extreme at values are -Inf orInf respectively, and the triangles occupy 5% of thetotal length of the color key. If numeric and between 0 and0.25, these give the corresponding fraction, which is again 5%when specified as TRUE.

labels:

a character vector for labelling the at values, or morecommonly, a list describing characteristics of the labels. Thislist may include components labels, at,cex, col, rot, font, fontfaceand fontfamily.

tick.number:

The approximate number of ticks desired.

tck:

A (scalar) multipler for tick lengths.

corner:

Interacts with x, y; currently unimplemented

width:

The width of the key

height:

The length of key as a fraction of theappropriate side of plot.

raster:

A logical flag indicating whether thecolorkey should be rendered as a raster image usinggrid.raster. See alsopanel.levelplot.raster.

interpolate:

Logical flag, passed torasterGrob when raster=TRUE.

axis.line:

A list giving graphical parameters forthe color key boundary and tick marks. Defaults totrellis.par.get('axis.line').

axis.text:

A list giving graphical parameters forthe tick mark labels on the color key. Defaults totrellis.par.get('axis.text').

contour

A logical flag, indicating whether to draw contour lines.

cuts

The number of levels the range of z would be divided into.

labels

Typically a logical indicating whether contour lines should belabelled, but other possibilities for more sophisticated controlexists. Details are documented in the help page forpanel.levelplot, to which this argument is passed onunchanged. That help page also documents the label.styleargument, which affects how the labels are rendered.

pretty

A logical flag, indicating whether to use pretty cut locations andlabels.

region

A logical flag, indicating whether regions between contour linesshould be filled as in a level plot.

allow.multiple, outer, prepanel, scales, strip, groups, xlab,xlim, ylab, ylim, drop.unused.levels, lattice.options,default.scales, subset

These arguments are described in the help page forxyplot.

default.prepanel

Occasional paper 25. Fallback prepanel function. See xyplot.

..

Further arguments may be supplied. Some are processed bylevelplot or contourplot, and those that areunrecognized are passed on to the panel function.

useRaster

A logical flag indicating whether raster representations should beused, both for the false color image and the color key (if present).Effectively, setting this to TRUE changes the default panelfunction from panel.levelplot topanel.levelplot.raster, and sets the default value ofcolorkey$raster to TRUE.

Note that panel.levelplot.raster provides only asubset of the features of panel.levelplot, but settinguseRaster=TRUE will not check whether any of the additionalfeatures have been requested.

Not all devices support raster images. For devices that appear tolack support, useRaster=TRUE will be ignored with a warning.

Details

These and all other high level Trellis functions have severalarguments in common. These are extensively documented only in thehelp page for xyplot, which should be consulted to learn moredetailed usage.

Wither

Level plots and contour plots

Description

Draws false color level plots and contour plots.

Usage

Arguments

x

for the formula method, a formula of the form z ~ x * y | g1 * g2 * .., where z is a numeric response, andx, y are numeric values evaluated on a rectangulargrid. g1, g2, .. are optional conditional variables, andmust be either factors or shingles if present.

Calculations are based on the assumption that all x and y values areevaluated on a grid (defined by their unique values). The functionwill not return an error if this is not true, but the display mightnot be meaningful. However, the x and y values need not be equallyspaced.

Both levelplot and wireframe have methods formatrix, array, and table objects, in which casex provides the z vector described above, while itsrows and columns are interpreted as the x and yvectors respectively. This is similar to the form used infilled.contour and image. For higher-dimensionalarrays and tables, further dimensions are used as conditioningvariables. Note that the dimnames may be duplicated; this ishandled by calling make.unique to make the namesunique (although the original labels are used for the x- andy-axes).

data

For the formula methods, an optional data frame in whichvariables in the formula (as well as groups andsubset, if any) are to be evaluated. Usually ignored with awarning in other cases.

row.values, column.values

Optional vectors of values thatdefine the grid when x is a matrix. row.values andcolumn.values must have the same lengths as nrow(x)and ncol(x) respectively. By default, row and columnnumbers.

Casio 3230 battery. Casio watch module: 3230 Battery type: CR2016 Battery price: 6$ average Amazon price. We may earn a commission on qualifying purchases from our links to Amazon Compatiable with watches: DW-6900, W.

panel

panel function used to create the display, as described inxyplot

aspect

For the matrix methods, the default aspect ratio is chosen tomake each cell square. The usual default is aspect='fill',as described in xyplot.

at

A numeric vector giving breakpoints along the range ofz. Contours (if any) will be drawn at these heights, and theregions in between would be colored using col.regions. Inthe latter case, values outside the range of at will not bedrawn at all. This serves as a way to limit the range of the datashown, similar to what a zlim argument might have been usedfor. However, this also means that when supplying atexplicitly, one has to be careful to include values outside therange of z to ensure that all the data are shown.

at can have length one only if region=FALSE.

col.regions

color vector to be used if regions is TRUE. Thegeneral idea is that this should be a color vector of moderatelylarge length (longer than the number of regions. By default this is100). It is expected that this vector would be gradually varying incolor (so that nearby colors would be similar). When the colors areactually chosen, they are chosen to be equally spaced along thisvector. When there are more regions than colors incol.regions, the colors are recycled. The actual colorassignment is performed by level.colors, which isdocumented separately.

alpha.regions

numeric, specifying alpha transparency (works only on some devices)

colorkey

logical specifying whether a color key is to be drawnalongside the plot, or a list describing the color key. The list maycontain the following components:

space:

location of the colorkey, can be one of 'left','right', 'top' and 'bottom'. Defaults to'right'.

x, y:

location, currently unused

col:

A color ramp specification, as in the col.regionsargument in level.colors

at:

numeric vector specifying where the colors change. must be oflength 1 more than the col vector.

tri.lower, tri.upper:

Logical or numeric controlling whether the first and lastintervals should be triangular instead of rectangular. With thedefault value (NA), this happens only if thecorresponding extreme at values are -Inf orInf respectively, and the triangles occupy 5% of thetotal length of the color key. If numeric and between 0 and0.25, these give the corresponding fraction, which is again 5%when specified as TRUE.

labels:

a character vector for labelling the at values, or morecommonly, a list describing characteristics of the labels. Thislist may include components labels, at,cex, col, rot, font, fontfaceand fontfamily.

tick.number:

The approximate number of ticks desired.

tck:

A (scalar) multipler for tick lengths.

corner:

Interacts with x, y; currently unimplemented

width:

The width of the key

height:

The length of key as a fraction of theappropriate side of plot.

raster:

A logical flag indicating whether thecolorkey should be rendered as a raster image usinggrid.raster. See alsopanel.levelplot.raster.

interpolate:

Logical flag, passed torasterGrob when raster=TRUE.

axis.line:

A list giving graphical parameters forthe color key boundary and tick marks. Defaults totrellis.par.get('axis.line').

axis.text:

A list giving graphical parameters forthe tick mark labels on the color key. Defaults totrellis.par.get('axis.text').

contour

A logical flag, indicating whether to draw contour lines.

cuts

The number of levels the range of z would be divided into.

labels

Typically a logical indicating whether contour lines should belabelled, but other possibilities for more sophisticated controlexists. Details are documented in the help page forpanel.levelplot, to which this argument is passed onunchanged. That help page also documents the label.styleargument, which affects how the labels are rendered.

pretty

A logical flag, indicating whether to use pretty cut locations andlabels.

region

A logical flag, indicating whether regions between contour linesshould be filled as in a level plot.

allow.multiple, outer, prepanel, scales, strip, groups, xlab,xlim, ylab, ylim, drop.unused.levels, lattice.options,default.scales, subset

These arguments are described in the help page forxyplot.

default.prepanel

Occasional paper 25. Fallback prepanel function. See xyplot.

..

Further arguments may be supplied. Some are processed bylevelplot or contourplot, and those that areunrecognized are passed on to the panel function.

useRaster

A logical flag indicating whether raster representations should beused, both for the false color image and the color key (if present).Effectively, setting this to TRUE changes the default panelfunction from panel.levelplot topanel.levelplot.raster, and sets the default value ofcolorkey$raster to TRUE.

Note that panel.levelplot.raster provides only asubset of the features of panel.levelplot, but settinguseRaster=TRUE will not check whether any of the additionalfeatures have been requested.

Not all devices support raster images. For devices that appear tolack support, useRaster=TRUE will be ignored with a warning.

Details

These and all other high level Trellis functions have severalarguments in common. These are extensively documented only in thehelp page for xyplot, which should be consulted to learn moredetailed usage.

Funnel plot: This is a useful graph designed to check the existence of publication bias in meta-analyses.Funnel plots, introduced by Light and Pillemer in 1994 and discussed in detail by Egger and colleagues, are useful adjuncts to meta-analyses. Oct 16, 2019 Scatter plots' primary uses are to observe and show relationships between two numeric variables. The dots in a scatter plot not only report the values of individual data points, but also patterns when the data are taken as a whole. Identification of correlational relationships are common with scatter plots. Bahria Town Phase 8 Bahria Town Phase 8 - Sector F-4 Property. Pair Plots Height Location Level and Solid Land-Street # 2a Pair Plots Prime & Height Location Level Plot Solid land Develop Plot Ready for Possession Construction Going Very Rapidly Best Option.

Plots Significance Levels

Other useful arguments are mentioned in the help page for the defaultpanel function panel.levelplot (these are formallyarguments to the panel function, but can be specified in the highlevel calls directly).

Value

An object of class 'trellis'. Theupdate method can be used toupdate components of the object and theprint method (usually called bydefault) will plot it on an appropriate plotting device.

Author(s)

Level Curves and Contour Plots Level curves and contour plots are another way of visualizing functions of two variables. If you have seen a topographic map then you have seen a contour plot. Example: To illustrate this we first draw the graph of z = x2 + y2. On this graph we draw contours, which are curves at a fixed height z = constant.

Matlab Label Plots

Deepayan Sarkar Deepayan.Sarkar@R-project.org

References

Sarkar, Deepayan (2008) Lattice: Multivariate DataVisualization with R, Springer.http://lmdvr.r-forge.r-project.org/

Plotline Vs Storyline

See Also

xyplot, Lattice,panel.levelplot

Ggplot Level Plots

Examples





broken image