Questions tagged [geom-tile]
86 questions
1
vote
1 answer
Tile length in geom_tile heatmap incorrect
I'm trying to visualize aggregated values for weekdays and hours of day with a heatmap in R using ggplots geom_tile. With my test-data, the method works just fine, however, when I try an excerpt of another test dataset the length of tiles is…

Ju Ko
- 466
- 7
- 22
1
vote
1 answer
exclusive scale to each x in geom_tile
I was trying to do a heatmap where each column has itself scale_fill_discrete.
Below all my tentative.
I'd like each key sharing the same plot but with itself scale, the closest I could do was the last…

Aureliano Guedes
- 767
- 6
- 22
1
vote
2 answers
How to order of tiles in geom_tile ggplot by using only part of the numeric variables
I'm trying to plot the a data in pivot_long form to present as a heatmap using geom_tile.
However I'm having trouble for ordering the tiles in the figure.
sample data…

ML33M
- 341
- 2
- 19
1
vote
0 answers
Stacking overlapping tiles using geom_tile()
I'm trying to figure out how to place tiles that represent points using geom_tile(), and my issue is that overlapping tiles only appear as one tile. I'm trying to get tiles with the same y-values to be adjacent to each other, even though they have…

F. H.
- 11
- 1
1
vote
1 answer
GGplot2 - problems with aes( fill)
I am trying to create a plot for upcoming football fixtures, with the colours based on the team's position (Pos) in the table. However, the fill doesn't seem to be choosing the right colour for the individual tiles as shown below. I have included…

BulletTooth
- 13
- 4
0
votes
1 answer
Change color filling of heatmap (ggplot)
Im trying to making a heatmap that illustrates how intense a newspaper writes about 6 different meta topics over a time period. I would like each topic to have its own color. The more intense the color is, the more the newspaper writes about it…

Sofie
- 17
- 4
0
votes
0 answers
Split Legend in combined geom_tile and geom_bar
I'm trying to combine a geom_tile and geom_bar plot while splitting the legends.
My sample data looks like this:
for_bar_plot <- read.table(text="
sample category count Date
Sample1 cat1 65 221116
Sample1 cat2 8978 221116
Sample2…

swbarnes2
- 101
- 1
0
votes
1 answer
Change color filling and position of legend in heatmap (gglot)
Im trying to make a heatmap, that illustrates how intense a newspaper write about 30 different news topics over a timeperiod.
The news topics can be grouped into 6 "meta topics" illustrated by the 6 different colors in the diagram below. However, I…

Sofie
- 17
- 4
0
votes
2 answers
Geom_tile in ggplot- scaling problem on the x axis
The resultant plot for my confusion matrix using geom_tile is off on my top scale axis.
Here's a mock code
library(ggplot2)
library(dplyr)
library(stringr)
pred<- c(1,1,1,2,2,4,3,4,4,3,3,3)
truth<- c(1,1,1,2,2,2,3,3,3,4,4,4)
predClass<-…

STEMQs
- 75
- 1
- 10
0
votes
0 answers
All colors greyed out when using ggplotly with geom_tile to make interactive heatmap
I am trying to make an interactive heatmap in R using a combination of geom_tile and ggplotly. However, when I run the ggplotly command, the interactive heatmap I get back only has grey values. Moreover, the interactive hover only seems to work for…

Thomas Luypaert
- 1
- 1
0
votes
0 answers
ggplot geom_tile: how can I force ggplot to display all possible variables of the x-axis, also those with no fill values?
I am currently working on this tile plot (not very experienced):
ggplot(df_A, aes(x = Sample.ID, y = Species, fill = Score)) +
geom_tile() +
scale_fill_gradient(low = "#FFC0CB", high = "#800080") +
theme(axis.text.x = element_text(angle = 100,…
0
votes
1 answer
Plotting a line with a certain condition in geom_tile
I'm plotting my data in a heatmap. Some of the data of the fill is positive and some is negative. I would like to plot a line over the heatmap that separates what is positive and what is negative.
I have looked up and tried using geom_contour, but…
0
votes
1 answer
Subdivide tiles in ggplot2 geom_tile into quarters
I am trying to create a more elegant correlation plot for seasonal data using ggplot2 and geom_tile(). I want to split each tile in the plot into four quadrants (one quadrant for each seasonal value).
I already have code to plot each season's…

C_goetsch
- 3
- 3
0
votes
1 answer
Setting a pattern or symbol as NA value in geom_tile
I have data i want to visualise using geom_tile. The data deal with references in text data from either Germany or Spain to other European countries.
Example data:
data<- tribble(
~Ref_country, ~Country, ~Share,
"ENG", "DE", 0.27,
"ENG", "ES",…

user18803194
- 57
- 4
0
votes
2 answers
How to color geom_tile ggplot2 graph color and dplyr filter
I am trying to make a geom_tile graph with ggplot2, where I color each cell based on a value. However, the colors in my graph keep getting messed up, where cells overlap each other, which looks terrible. How do I properly assign colors to groups…

user8229029
- 883
- 9
- 21