Questions tagged [geom-tile]
86 questions
0
votes
2 answers
How interpret gray fields of grid produced by geom_tile?
I have produced a grid using and I am at a loss with how to interpret the gray fields. The scaling is set at viridis, meaning, the colour of the field should vary between blue and yellow. So: How do I interpret gray fields or what type…

RibbitRibbit
- 93
- 5
0
votes
1 answer
Plot a heat map with a gradient for the tiles based on the proximity of a specific area of the plot
My goal is to use a heat map to plot the data below. I have obtained the layout of the heat map I wanted, but I am struggling to find a way to color the tiles as intended. My guess is that the code below colors the tiles proportional to the number…

Michael Matta
- 394
- 2
- 16
0
votes
0 answers
Order the variable of the Y axis in "geom_title"
Question: I want order the variable in Y axis based on the number of "Zero". Other than, what if I have 20 or more variable?
my data is simple and show in the fig:
I use ggplot2 to draw that, here is my code:
ggplot(data, aes(year, factor(name))) +…

shuaige C
- 21
- 5
0
votes
1 answer
ggplot geom_tile adds an additional, unwanted column at start and end when x-axis values are not characters
Context
I am trying to generate a heatmap for the evaluation of an exercise on process scheduling. The rows (y-axis) correspond to processes and the columns (x-axis) to the current time step.
The data is available to me as a matrix corresponding to…

Liqs
- 137
- 1
- 9
0
votes
1 answer
ggplot Correlational Heatmap With Sums Instead of Correlations
I have a dataset of legislation that was passed in state houses that is coded into different types of bills. The bills overlap (e.g., a bill could cover topics A and B, or B and C, or just A).
I am trying to create a visualization similar to the…

babybonobo
- 89
- 8
0
votes
1 answer
How can I clean up my ggplot geom_tile? How do I with create a legend and edit my label locations?
would like to:
add a legend for the fill,
move my axis labels and title,
use specific colors for the three fill values
Code below
#adding data and libraries
library(tidyverse)
library(plotly)
library(here)
library(dplyr)
trails =…

cd19_ bri
- 23
- 3
0
votes
1 answer
Why do I get an empty plot using geom_tile on Rstudio?
I'm quite new in R programming and I am trying to visualise Normalised Mutual Information between different clusters (obtained with different algorithms).
My goal would be to obtain something like this :
It looks like a ggcorrplot but i tried with…
0
votes
1 answer
sorting data in geom_tile()
My data:
GFP_mywide<-bothdata[1:10,c(2,3,4)]
GFP_long<-melt(GFP_mywide, id =c('Entrez.Symbol'))
looks like this:
>GFP_long
Entrez.Symbol variable value
1 TRIP11 GFP_my 1.015
2 SIN3B GFP_my 0.336
3 SF3B1 GFP_my…

Chemokine1
- 17
- 3
0
votes
1 answer
force legend in geom_tile (ggplot, R)
I don't manage to add a continuous legend to a ggplot using geom_tile.
I had to manipulate the layer_data (for various reasons), hence obtaining a dataframe of the type:
data =
fill x y PANEL group xmin xmax ymin ymax colour size linetype…

larmor
- 1
- 1
0
votes
1 answer
"Crossing off" tiles on a heatmap
For a heatmap made using ggplot and geom_tile, how would you "cross off" a tile based on a conditional value?
The heatmap shows counts of the number of times an animal performed a behavior between 1990-2020.
Rows are animal IDs, columns are…

burphound
- 161
- 7
0
votes
1 answer
How to specify break points in legend for geom_tile plot?
I'm making a sort-of heat map using geom_tile, and I'm running into a small aesthetic issue with the legend. As is, I'm generating breaks in the legend using the number of levels in my data, and the plot looks great, but the breaks aren't equally…

MadelineJC
- 97
- 7
0
votes
1 answer
Sorting a dataframe to create a "quilt" chart using geom_tile in ggplot2
I am looking to create a "quilt" chart that would show the best performing category in each year. This is a fairly common chart, but I have no idea how to produce this in R. Below is a simple reproducible example.
fruit <- c("Apples", "Oranges",…

Sean
- 3
- 3
0
votes
1 answer
What value is used by the fill argument if the mapped variable isn't unique (ggplot)
Say we have some data like so:
df <- as.data.frame(matrix(ncol=4, nrow=12))
colnames(df) <- c("week", "hour", "fill", "day")
df$day <- rep(c("S", "S", "M", "M", "T", "T"), 2)
df$hour <- rep(seq(1,2,1),6)
df$week <- c(rep(seq(3,4,1),3),…

H. Denis
- 7
- 3
0
votes
1 answer
In geom_tile(), how to change vertical or horizon border color of the cell
In geom_tile(), how to change vertical or horizon border color of the cell ?
library(tidyverse)
month <- c(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10)
category <-…

anderwyang
- 1,801
- 4
- 18
0
votes
1 answer
Aligning axes in ggplot2 heat map
I'm working on creating some heat maps in ggplot2 using geom_tile(). The data is of peak discharge measurements in two rivers. The x-axis is the day of the year, the y-axis is the year, and the colour is the discharge value:
Notice that in River 1,…

EllieP
- 11
- 2