Questions tagged [geom-tile]
86 questions
0
votes
2 answers
tile plot for continuous variable in r
I want to see the average departure delay in flights dataset from nycflights13 by distance and month with tile plot. I plotted it and I got this:
How can I see it better? I can't understand anything.

Mina
- 327
- 1
- 6
0
votes
1 answer
How does not display the matrix diagonal data in ggplot2?
I want to plot Correlation matrix plot. like this
so, I generated a matrix data and ploted in R.
but, I got a strange picture.
this is my code.
aa1=data.frame(eada=c(1.1,5,0,0,0,0),
goke=c(2.2,5,0,0,0,0),
…

Rosie
- 21
- 2
0
votes
1 answer
R geom_tile on theme_void has blank space above and below plot
When using geom_tile() to make a ggplot object with theme_void()
there are blank areas at top and bottom of plot, and
when using patchwork to add pieces these cause a mis-alignment
of right=side marginal bars (as in screenshot attached).
Please is…

John McKeown
- 29
- 7
0
votes
1 answer
Plotting a matrix on ggmap with geom_tile not working
I'm trying to plot a matrix (mostly random numbers with a few NAs) with longitude/latitude coordinates on a ggmap plot.
This is my code:
library(ggmap)
library(ggplot2)
define the longitude and latitude…

AlexLee
- 429
- 4
- 11
0
votes
1 answer
Using the RColorBrewer with scale_fill_gradientn(), I keep getting the same error
I'm working with the following code:
library('colorspace')
blups <- brewer.pal(9, 'BuPu')
geom_tile(aes(lon, lat, fill = predicted_price), alpha = 0.8) + scale_fill_gradientn(colors = blups)
The error msg is:
Check your call of…

CharlieS
- 1
- 1
0
votes
1 answer
How to exclude given figure in the color fill render?
In R ggplot2/geom_tile, how to exclude the data in 'month==6 & category==c' ?
(i mean the data not join the tile fill render, but still keep in the image)
library(tidyverse)
plot_data <-…

anderwyang
- 1,801
- 4
- 18
0
votes
1 answer
Conditionally applying alpha parameter for some values in geom_tile
I am using geom_tile to create a heatmap. I want to customize the heatmap by highlighting cells that meet a certain criteria. Specifically, I want any cell with a value less than 10 to be set to a lower transparency. Everything above 10 should be…

CurtLH
- 2,329
- 4
- 41
- 64
0
votes
2 answers
Dont understand the why this book solution is "right" for cleaning up data in flights dataset
I'm working through the questions of R for Data Science and the website's solutions here: https://jrnold.github.io/r4ds-exercise-solutions/exploratory-data-analysis.html.
The question I'm working on is:
Use geom_tile() together with dplyr to…

Shawn Hemelstrand
- 2,676
- 4
- 17
- 30
0
votes
1 answer
geom_tile based on results of clustering
I'm making a heat map using geom_tile().
I would like to order y-axis(sp) based on clustering (the actual data has about 200 sp records).
sp <- c("sp1","sp1","sp1","sp2","sp2","sp2","sp3","sp3","sp3","sp4","sp4","sp4","sp5","sp5","sp5")
category…

marie
- 315
- 1
- 9
0
votes
1 answer
ggplot legend based on axis colors
I am trying to create a legend in ggplot based on the color of the y axis I have set.
Does anyone know if a way to manually create a legend based off of data not present in the figure itself?
Below is a toy example of the plot and code. In this…

eycramer
- 75
- 3
0
votes
1 answer
matching geom_point size to the geom_tile size
I'm trying to combine geom_tile with geom_point to show a gene expression knockdown effect on a cardiac phenotypes and whether this effect is enhanced or reduced compared to a control:
The following code creates and example of this.
g <- read_excel(…

krifa sallouha
- 1
- 2
0
votes
0 answers
Add color gradient to only few tiles in geom_tile
I want to color the tiles in a geom_tile plot for the combinations for which the chi-square hypothesis is accepted as grey. Add color gradient based on chi-square value for the combinations for which the hypothesis is rejected. Now, the logical…

vp_050
- 583
- 2
- 4
- 16
0
votes
0 answers
How to set NA values from a matrix to black-coloured tiles in a ggplot heatmap
I am working on the following structure and the following plotting code:
structure(c(NA, 11, 9, 9, 21, 7, 2, 5, 3, 0, 0, 1, 31, NA, 3,
2, 1, 0, 0, 10, 3, 0, 0, 0, 31, 16, NA, 2, 2, 10, 0, 5, 0, 0,
0, 0, 59, 65, 1, NA, 2, 4, 0, 4, 0, 0, 0, 0, 156,…

Cameron
- 85
- 6
0
votes
1 answer
How do I add a separate legend for each variable in geom_tile?
I would like to have a separate scale bar for each variable.
I have measurements taken throughout the water column for which the means have been calculated into 50cm bins. I would like to use geom_tile to show the variation of each variable in each…

Jo Harris
- 98
- 9
0
votes
0 answers
Add a specific color to each tile and a legend in geom_tile
I want to add two things to the following figure:
add a legend (zp or df$legend) (which is similar to each block) to the geom_tile figure
assign a specific color to each tile (which repeats for every block) instead of scale_fill_continuous but keep…

yazdan
- 23
- 5