Questions tagged [geom-raster]
52 questions
0
votes
0 answers
R : ggplot - use geom_raster with facet_wrap
Consider these 3 variables : A [100*1], B [100*1], and M [100*1]. Variable M has 7 classes. For each class, I would like to plot a raster like :
ggplot(data = test, aes(x = factor(A), y = factor(B), fill = M)) +
xlab("A") + ylab("B") +
…

Basilique
- 150
- 1
- 11
0
votes
1 answer
Sequence plot with ggplot2 and geom_raster
I want to create a sequence plot like here (first figure, b)):
http://traminer.unige.ch/preview-visualizing.shtml
But I want to use ggplot2 for this. I "melted" the data for this purpose because I don't like the wide-format. Now I plotted the…

TobiSonne
- 1,044
- 7
- 22
0
votes
0 answers
R ggplot geom_raster increase row height to avoid overlapping of points
Hi ggplot and R experts,
A newbie here. I have a usecase where I am using geom_raster for better optimisation.
Here is the reproducible R script:
require(ggplot2)
library(ggrepel)
# Create the data frame.
sales_data <- data.frame(
emp_name =…

Om Sao
- 7,064
- 2
- 47
- 61
0
votes
1 answer
geom_raster does not plot all values
I have an odd behavior in geom_raster. It does not plot place tiles in all the values for some reason. It should plot 1015 non-zero values in color, but I only get a few tiles. If you filter out the non-zero values with dat <- subset(dat, w!=0) then…

shai
- 3
- 1
0
votes
1 answer
geom_raster not rendering as expected
I have previously asked a related question (Status by duration bar visualisation), but I am now having trouble with the graph actually rendering...
Here is the code to replicate what I currently have:
testData <- structure(list(result =…

Froom2
- 1,269
- 2
- 13
- 26
0
votes
1 answer
Using geom_raster function returns invalid 'type' (list) of argument
I am trying to plot a matrix data into d*d grid using R. So I used geom_raster function.
I have data with three variables: row and col specify the location for each data point, and w is the data I wish to plot using geom_raster.
I simulate the three…

Paul
- 303
- 1
- 3
- 14
0
votes
0 answers
Why is geom_raster being smoothed out in a knitr doc?
I am plotting a matrix with geom_raster in ggplot. If I look at the plot myself in RStudio, it is unsmoothed:
When I compile the knitr doc into a PDF, it gets smoothed somehow:
Any idea what's happening?
(Ignore the aspect ratio, I'd expect…

dfrankow
- 20,191
- 41
- 152
- 214