541 search results for "lattice"

Euler Problem 15: Pathways Through a Lattice

March 9, 2017
By
Euler Problem 15: Pathways Through a Lattice

Solution in the R language to project Euler Problem 15. The problem asks to calculate the number of pathways through a 20 by 20 grid. Continue reading → The post Euler Problem 15: Pathways Through a Lattice appeared first on The Devil is in the Data.

Read more »

Lattice exercises – part 2

May 24, 2016
By
Lattice exercises – part 2

In this set of exercises we will use lattice package. Firstly, we have to install this package with command install.packages("lattice") and then we will call it library(lattice) . Lattice package permits us to create univariate, bivariate and trivariate plots. For this set of exercises we will see trivariate plots. We will use a dataset example

Read more »

Lattice exercises – part 1

April 30, 2016
By
Lattice exercises – part 1

In the exercises below we will use the lattice package. First, we have to install this package with install.packages("lattice") and then we will call it library(lattice) . The Lattice package permits us to create univariate, bivariate and trivariate plots. For this set of exercises we will see univariate and bivariate plots. We will use a

Read more »

How to place titles in lattice plots

June 16, 2015
By
How to place titles in lattice plots

I like the Economist theme in the latticeExtra package. It produces nice looking charts that mimic the design of the weekly newspaper, such as in this example:For some time I wondered how I could put the title of my lattice plots into the top left corner as well (by default titles are centred). Reviewing...

Read more »

Combining several lattice charts into one

April 21, 2015
By
Combining several lattice charts into one

Last week I mentioned the grid.arrange function of the gridExtra package that allows me to combine graphical grid objects onto one page. The latticeExtra package provides another elegant solution for trellis (lattice) plots: the function c.trellis() or...

Read more »

Mapping Flows in R … with data.table and lattice

Mapping Flows in R … with data.table and lattice

Some days ago James Cheshire published the post Mapping Flows in R. I have implemented an alternative (faster) version using …Sigue leyendo →

Read more »

R: Annotate the panels in a multi-panel lattice plot in 1 line

March 13, 2015
By

Just use panel.lmline()

Read more »

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

October 16, 2014
By
ggplot2 Version of Figures in “Lattice: Multivariate Data Visualization with R” (Part 1)

Originally posted on Learning R: The data visualization package lattice is part of the base R distribution, and like ggplot2 is built on Grid graphics engine. Deepayan Sarkar’s (the developer of lattice) book Lattice: Multivariate Data Visualization with R gives a detailed overview of how the package works. All the figures and code used to…

Read more »

Adding labels within lattice panels by group

February 18, 2014
By
Adding labels within lattice panels by group

The other day I had data that showed the development of many products over time. I grouped the products into categories and visualised the data as line graphs in lattice. But instead of adding an extensive legend to the plot I wanted to add labels to each line's latest point. How do you do that? It turns out that...

Read more »

Conditioning and Grouping with Lattice Graphics

February 17, 2014
By
Conditioning and Grouping with Lattice Graphics

Conditioning and grouping are two important concepts in graphing that allow us to rapidly refine our understanding of data under consideration. Conditioning, in particular, allows us to view relationships across “panels” with common scales. Each panel contains a plot whose data is “conditional” upon records drawn from the category that supports that particular panel (an

Read more »

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)