lattice Questions

6

Solved

Let's say I have this simple data: mydata <- data.frame(group=c("A", "B", "0", "AB"), FR=c(20, 32, 32, 16)) If I want to create a pie chart from this dataframe I can do: with(mydata,pie(FR...
Furfural asked 8/11, 2015 at 13:47

2

Solved

What is the simplest way to make just this plot grayscale (or perhaps black and white) rather than the default multi-colour: xyplot(y1 + y2 ~ x, mydata, auto.key=TRUE) I've seen discussion of cr...
Nacelle asked 16/2, 2012 at 6:28

7

Solved

What are the alternatives for drawing a simple curve for a function like eq = function(x){x*x} in R? It sounds such an obvious question, but I could only find these related questions on stackov...
Westward asked 29/9, 2014 at 1:20

3

how do I change the text displayed in the strips of lattice plots? example: suppose I have a data frame test consisting of 3 columns x [1] 1 2 3 4 5 6 7 8 9 10 y [1] "A" "A" "A" "A" "A" "B" "B"...
Fishtail asked 10/9, 2011 at 17:46

2

When I want to create a scatterplot matrix, there is a error about Error in grid.Call.graphics(C_downviewport, name$name, strict) : Viewport 'plot_01.panel.1.1.off.vp' was not found". How ...
Overthrust asked 11/5, 2018 at 19:52

3

Solved

Is it possible in R to create a color key like the one below? (this one comes from the software Grid Analysis and Display System - Grads). There are two features that I can't reproduce in R: ...
Stateless asked 23/11, 2017 at 15:40

4

Solved

How to create a chart like the following in R? Some toy data would look like this: # Data data <- rep(c(0, 25, 50, 75, 100),6) data <- matrix(data, ncol=3, byrow=TRUE) colnames(data) &l...
Kunkle asked 6/3, 2014 at 12:50

3

Solved

How can I make a histogram in which the center of each bar lies along a common axis? This would look like a violin plot with step-shaped edges. I'd like to do this in Lattice, and don't mind custo...
Hydrobomb asked 6/4, 2013 at 4:0

1

Solved

I have panel data with 50 different individuals over 60 months. I've created facet grids using Seaborn to plot the tone for each individual over time and now want to add vertical lines for when an ...
Vinnie asked 26/6, 2020 at 15:22

1

Solved

What is the required incantation to achieve an overlapping, faceted lattice::histogram with common break points (across groups, but potentially varying across panels)? For example, assume I want th...
Diversify asked 22/1, 2020 at 1:44

4

Solved

I have a data frame that looks something like this: Samp1 Samp2 Samp3 Samp4 Samp5 Gene1 84.1 45.2 34.3 54.6 76.2 Gene2 94.2 12.4 68.0 75.3 24.8 Gene3 29.5 10.5 43.2 39.5 45.5 ... I am trying to...
Brauer asked 19/11, 2012 at 22:18

2

Solved

I can draw relative frequency histogram in R, using lattice package: a <- runif(100) library(lattice) histogram(a) I want to get the same graph in ggplot. I tried dt <- data.frame(a) ggp...
Qualls asked 9/8, 2019 at 13:16

4

Solved

I am using following commands to produce a scatterplot with jitter: ddf = data.frame(NUMS = rnorm(500), GRP = sample(LETTERS[1:5],500,replace=T)) library(lattice) stripplot(NUMS~GRP,data=ddf, jitt...
Edmondson asked 15/5, 2014 at 10:33

6

Solved

Creating heatmaps in R has been a topic of many posts, discussions and iterations. My main problem is that it's tricky to combine visual flexibility of solutions available in lattice levelplot() or...
Kliber asked 19/3, 2013 at 16:50

1

Solved

I can easily make a mesh3d plot in R: library(plotly) x <- runif(50, 0, 110) y <- runif(50, 0, 1) z <- runif(50, 1, 2) plot_ly(x = ~x, y = ~y, z = ~z, type = 'mesh3d') I want to color ...
Heteronym asked 30/1, 2019 at 19:52

2

Solved

I know how to combine plots created by R graphics. Just do something like attach(mtcars) par(mfrow = c(3,1)) hist(wt) hist(mpg) hist(disp) However, now I have plots by three different graphic s...
Diapositive asked 25/4, 2018 at 0:49

0

The grid package used for generating graphics in the R language uses so-called "normal parent coordinates" (npc) to position graphical objects ("grobs"). Is it possible to get the npc coordinates o...
Carisacarissa asked 9/2, 2018 at 16:47

2

Solved

I'm plotting a calender heat map using Paul Bleicher's calenderHeat.R code and this is my plot: I was wondering how I could add dates to the plot, instead of the blank grids. Here's my sample dat...
Huckleberry asked 2/10, 2014 at 23:13

11

Solved

I plot a simple linear regression using R. I would like to save that image as PNG or JPEG. Is it possible to do it automatically? (via code) There are two different questions: First, I am already l...
Polygraph asked 22/8, 2011 at 7:6

1

Solved

is there any way to plot a graph like this in R and have the same 12 axes on it with thier name ? here's a pic for the graph. here's a piece of my data Date1 Time TravelTime 1 2016-09-04 13:1...
Moretta asked 14/9, 2016 at 0:30

1

Solved

How does one add a title to the color key in a lattice contourplot? library(lattice) contourplot(volcano, region=T, main='title') I've searched the documentation and don't see anything about t...
Putandtake asked 2/6, 2016 at 18:37

4

Solved

have some data that I would like to add "stippling" to show where it is "important", as they do in the IPCC plots At the moment I am really struggling with trying to do this in R. If I make u...
Nalda asked 31/7, 2012 at 9:26

2

It would be convenient to interactively select a decent viewpoint using rgl and then adopt the same orientation in a lattice 3d-plot. For example, given the following plot using a non-informative v...
Starstarboard asked 3/5, 2016 at 15:3

2

Solved

I'm creating many plots (each as a separate image) that all must have identical axis limits. When using ylim, the tick marks are awkwardly placed at the extreme edges and tick labels are omitted fo...
Frailty asked 11/7, 2013 at 2:50

2

Solved

I have a dataframe ("data") with 7 columns (2 Factor, 5 num). The first column is containing the names of 7 different countries and in the following columns I have collected data for diff...
Bitterweed asked 12/4, 2016 at 19:49

© 2022 - 2025 — McMap. All rights reserved.