# lattice

### How to display scatter plot matrices with R and lattice

March 18, 2011 |

In lattice, there is a function called splom for the display of scatter plot matrices. For large datasets, the panel.hexbinplot from the hexbin package is a better option than the default panel. As an example, let’s use some meteorological data from MAPA-SIAR: library(solaR) library(hexbin) aranjuez [Read more...]

### Five ways to visualize your pairwise comparisons

March 5, 2011 |

In data analysis it is often nice to look at all pairwise combinations of continuous variables in scatterplots. Up until recently, I have used the function splom in the package lattice, but ggplot2 has superior aesthetics, I think anyway.Here a fe... [Read more...]

### Confidence bands with lattice and R

December 10, 2010 |

If you use lattice with R, and you need to plot confidence limits in your graphic, then panel.smoother and panel.quantile from latticeExtra will help you with this task. These functions internally calculate the error bounds and use panel.polygon from lattice. If you need to plot your own ... [Read more...]

### Creating surface plots

May 28, 2010 |

A 3d wireframe plot is a type of graph that is used to display a surface – geographic data is an example of where this type of graph would be used or it could be used to display a fitted model with more than one explanatory variable. These plots are related ...

### Displaying data using level plots

May 3, 2010 |

A level plot is a type of graph that is used to display a surface in two rather than three dimensions – the surface is viewed from above as if we were looking straight down and is an alternative to a contour plot – geographic data is an example of where this ...

### Analysis of Covariance – Extending Simple Linear Regression

April 28, 2010 |

The simple linear regression model considers the relationship between two variables and in many cases more information will be available that can be used to extend the model. For example, there might be a categorical variable (sometimes known as a covariate) that can be used to divide the data set ...

### Summarising data using box and whisker plots

April 25, 2010 |

A box and whisker plot is a type of graphical display that can be used to summarise a set of data based on the five number summary of this data. The summary statistics used to create a box and whisker plot are the median of the data, the lower and ...

### Simple Linear Regression

April 23, 2010 |

One of the most frequent used techniques in statistics is linear regression where we investigate the potential relationship between a variable of interest (often called the response variable but there are many other names in use) and a set of one of more variables (known as the independent variables or ...

### Summarising data using scatter plots

April 18, 2010 |

A scatter plot is a graph used to investigate the relationship between two variables in a data set. The x and y axes are used for the values of the two variables and a symbol on the graph represents the combination for each pair of values in the data set. ...

### Working with themes in Lattice Graphics

April 12, 2010 |

The Trellis graphics approach provides facilities for creating effective graphs with a consistent look and feel and one of the good things about the system is the use of themes to define the colour, size and other features of the components that make up a graph. The lattice package in ... [Read more...]

### Summarising data using histograms

April 11, 2010 |

The histogram is a standard type of graphic used to summarise univariate data where the range of values in the data set is divided into regions and a bar (usually vertical) is plotted in each of these regions with height proportional to the frequency of observations in that region. In ... [Read more...]

### Summarising data using dot plots

March 26, 2010 |

A dot plot is a type of display that compares counts, frequencies, totals or other summary measures for a series of categories. The dot plot can be arranged with the categories either on the vertical or horizontal axis of the display to allow comparising between the different categories as well ... [Read more...]

### Lattice: Multivariate Data Visualization with R

January 11, 2010 |

I have just reviewed Sarkar‘s Lattice: Multivariate Data Visualization with R for the Journal of the Royal Statistical Society Series A.  I would highly recommend the book to all R users who wish to produce publication quality g... [Read more...]

### Summarising data using bar charts

December 12, 2009 |

A bar graph is a frequently used type of display that compares counts, frequencies, totals or other summary measures for a series of categories, e.g. sales in different market sectors or in quarters in a financial year. The bar graph can be laid out with the categories either on ... [Read more...]

### Using Faceting in ggplot2 to create Trellis-like Plots

November 9, 2009 |

One of the main strengths of the Trellis graphics paradigm is the use of panelling to divide data into subsets to investigate whether patterns are consistent as the conditioning variables change. In the ggplot2 package the terminology for specifying these separate panels is faceting and can be used to create ... [Read more...]

### Investigation the relationship between two variables using a scatter plot

October 13, 2009 |

The relationship between two variables can be visually represented using a scatter plot and will provide some insight into the correlation between the variables and possible models to describe the relationship. There are different ways to produce scatter plots in R making use of either the base graphics system, the ... [Read more...]

### ggplot2 Version of Figures in “Lattice: Multivariate Data Visualization with R” (Final Part)

August 25, 2009 |

Over the past weeks I have tried to replicate the figures in Lattice: Multivariate Data Visualization with R using Hadley Wickham’s ggplot2. With the exception of a few graph types (e.g. ggplot2 doesn’t support 3d-graphs, and there were a few other cases), it was possible to create ... [Read more...]

### ggplot2 Version of Figures in “Lattice: Multivariate Data Visualization with R” (Part 13)

August 20, 2009 |

This is the 13th post in a series attempting to recreate the figures in Lattice: Multivariate Data Visualization with R (R code available here) with ggplot2. Previous parts in this series: Part 1, Part 2, Part 3, Part 4, Part 5, Part 6, Part 7, Part 8, Part 9, Part 10, Part 11, Part 12. Chapter 14 [...] [Read more...]

### ggplot2 Version of Figures in “Lattice: Multivariate Data Visualization with R” (Part 12)

August 18, 2009 |

This is the 12th post in a series attempting to recreate the figures in Lattice: Multivariate Data Visualization with R (R code available here) with ggplot2. Previous parts in this series: Part 1, Part 2, Part 3, Part 4, Part 5, Part 6, Part 7, Part 8, Part 9, Part 10, Part 11. Chapter 13 – Advanced [...] [Read more...]

### ggplot2 Version of Figures in “Lattice: Multivariate Data Visualization with R” (Part 11)

August 13, 2009 |

This is the 11th post in a series attempting to recreate the figures in Lattice: Multivariate Data Visualization with R (R code available here) with ggplot2. Previous parts in this series: Part 1, Part 2, Part 3, Part 4, Part 5, Part 6, Part 7, Part 8, Part 9, Part 10. Chapter 11 – Manipulating the “trellis” [...] [Read more...]
1 2 3