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
-1
votes
2 answers

Create horizon plot

I have the following example data and want to create a horizon plot, showing the changes in area column over the year. Any suggestion on doing this using ggplot2? year <- 1990:2005 area1 <- runif(16, 18,20) area2 <- runif (16,6,6.7) area3 <-…
Geo-sp
  • 1,704
  • 3
  • 19
  • 42
-1
votes
1 answer

How to label the first few points and create non-overlapping labels on a plot using direct.label

How can I easily create a plot where the text is not overlapping? Also How could I create a plot where I just label the first few points? Like the image below, I want to always label the bottom left hand part of the…
user_123
  • 62
  • 12
-1
votes
1 answer

Creating a scatter diagram with least square regression line according to Type

I have data that is set up like the following: type age rust 0 1 29.00 0 0 95.00 ..... 1 1800 7.56 I would like to create a scatter diagram of rust vs. age according to Type 0 and 1. I also would like to…
Dubbedmyx
  • 1
  • 2
-1
votes
1 answer

How to reproduce this graphical explanation (a scatter plot) of how covariance works?

I found this graphical intuitive explanation of covariance: 32 binormal points drawn from distributions with the given covariances, ordered from most negative (bluest) to most positive (reddest) The whole material can be found…
Claudiu Papasteri
  • 2,469
  • 1
  • 17
  • 30
-1
votes
1 answer

r - taking difference of two xyplots?

I have several xyplot objects that I have saved as .RDATA files. I am now interested in being able to look at their differences. I have tried things like plot1-plot2 but this does not work (I get the "non-numeric argument to binary operator…
Paul
  • 1,106
  • 1
  • 16
  • 39
-1
votes
1 answer

R: using 2 data frames in Lattice plotting

I have split a data set into two different data frames. I want to use both data frames making a 2 panel plot using lattice. I need to know if this is possible? Or do I have to keep 1 data frame and create a factor variable?
user3648688
  • 69
  • 1
  • 5
-1
votes
1 answer

Smoothing contour lines in a levelplot and ignoring values less than 0

I am trying to make a "smoothed" contour plot using the lattice package and curious if is any way to "ignore" half of the values in my matrix. A little difficult to explain but hopefully my code clarifies this question. link to my…
madeckmann
  • 61
  • 1
  • 1
  • 5
-1
votes
2 answers

Plotting multiple lines R

I have the following data: dim tuples buckets error is.init 1 5 13500000 50 0.29 TRUE 2 5 13500000 100 0.28 TRUE 3 5 13500000 150 0.27 TRUE 4 5 13500000 200 0.26 TRUE 5 5 13500000 250 0.26 …
Ando Khachatryan
  • 291
  • 1
  • 3
  • 5
-1
votes
1 answer

X scale values very compacted on R plots with lattice

I'm using this code to generate a plot: require(lattice) allcol <-…
Jorge Suárez de Lis
  • 565
  • 1
  • 10
  • 29
-2
votes
1 answer

Boucing effect vhdl in a fpga

im in internship and my company wants that i learn vhdl for fpga. I'm using lattice diamond to code and compile my project and questasim for simulation. I also have a little board for training : MachXO3LF by Lattice. I did a project : when i push a…
julien1h
  • 85
  • 7
-2
votes
2 answers

how to graph levels in x and y coordinates (level plot)?

I have an extensive set of levels of my interest variable (over a year of collection). I would like to plot these levels (there are 3 levels) in coordinates X (date of the year- the day of the year) and Y (time of day- hour). I am encountering…
Marcel
  • 147
  • 4
-2
votes
1 answer

How to change the axis title font size of a `trellis` object?

I have a trellis object generated by a 3rd-party package. With that being said, I cannot change the attributes by re-creating another trellis object. I have to change its attributes after it has been created. I have figured out which attributes…
Matthew Hui
  • 634
  • 5
  • 18
-2
votes
1 answer

data visualization of multiple barplot in same graph R

I have this dataset Feature Distance LOF Mahalanobis Cook DIFFTS OCSVM DBSCAN PCA Gaussian V1V2 A 8.5 8.8 9.5 10.5 3.8 7.3 0.0 5.4 V1V2 B 3.7 5.4 5.2 5.3 3.5 4.8 0.0 1.7 V1V2 C 8.8 9.3 7.7 8.4 4.6 6.8 0.0 3.1 V1V3 …
-2
votes
1 answer

R color points in stripplot

i created one stripplot in R with lattice package. stripplot(a~ b, data = df) Now i want a different colour in a specific point. Is it possible? Greetings
VDCastro
  • 41
  • 1
  • 3
-2
votes
1 answer

how to plot a bar chart with non-sorted x-axis (lattice)

My code are showed as follows: read.table("GO.txt",header=T,sep=',')->go library(lattice) barchart(go[,1]~go[,2],horiz=F,ylim=c(30,29666), layout=c(1,1),stack=F, auto.key=list(space='right'), ylab="Yes", scales=list(x=list(rot=45),y=list(log =…
Sandy
  • 99
  • 1
  • 9
1 2 3
83
84