Questions tagged [lattice]

lattice is a package that forms part of base R and allows the creation of trellis-type graphics.

R's lattice package, developed by Deepayan Sarkar, is a port of Bell Laboratories' Trellis Graphics to R. It is one of the three main graphics options in R, the other two being R's base graphics capabilities and .

Repositories

Vignettes

Books

Other resources

R packages extending lattice

  • latticeDensity: Density estimation and nonparametric regression on irregular regions.
  • latticeExtra: Extra Graphical Utilities Based on Lattice.
  • latticist: A graphical user interface for exploratory visualisation.
  • latticedl: Lattice direct labels, for automatically labeling points.

Related tags

1251 questions
-3
votes
3 answers

plots on one window in ggplot2

I have the following code, that generate the seperate plots. I want to get all these plots in one grid. How this can be done.? Is there alternative method in lattice to get the similar plots? v1 <- rep(c(2,4,6,8,10), each = 6) v2 <- rep(1:3,10) …
-3
votes
1 answer

R line chart with numbers on the graph

I need to plot some numeric vectors in R but I would like to see the numbers on the graph. For example, let's suppose to plot a function with a line chart. I would like to visualize the number corresponding to max/min values of the function directly…
opt
  • 477
  • 1
  • 10
  • 25
-3
votes
1 answer

How to convert lattice-based graphics to ggplot2?

The attached script performs equivalence tests on sample variables x, y and z. equivalence.xyplot() is really handy, although the base lattice graphics are a pain to work with. How can I use ggplot2 to plot these data rather than the base lattice…
Borealis
  • 8,044
  • 17
  • 64
  • 112
-4
votes
1 answer

Use data.frame to analyse data

I need to use this data.frame to analyse data Investment using package lattice. Requirement is to use data.frame. Instead of the variable Investment I need to put variables which have influence to the Investment. I need to draw different graphs. I…
LuckyProgrammer
  • 79
  • 1
  • 1
  • 8
-4
votes
1 answer

How to prevent histogram() from changing data when setting xlim

I'm using lattice's histogram to create a density plot of car's MPG measures: histogram(~mtcars20$City.MPG) For some reason, adding xlim distorts the data: histogram(~mtcars20$City.MPG,xlim=c(0,30)) Note that the data is now between 0 and 8…
Jan Luba
  • 86
  • 1
  • 8
1 2 3
83
84