Questions tagged [geom-tile]

86 questions
0
votes
1 answer

Changing breaks on a geom_tile() heatmap

I am working on the following dataframe: structure(c(NA, 52, 22, 52, 111, 0, 3, 16, 5, 0, 0, 80, NA, 14, 243, 14, 41, 1, 177, 3, 0, 20, 26, 8, NA, 13, 21, 10, 0, 0, 0, 0, 0, 59, 29, 7, NA, 15, 20, 0, 8, 8, 0, 0, 111, 9, 273, 1733, NA, 60, 3, 14,…
Cameron
  • 85
  • 6
0
votes
1 answer

Reorder rows according to two column values in geom_tile() heatmap

library(tidyverse) df <- data.frame(country = c("USA", "USA", "USA", "UK", "UK", "UK", "Japan", "Japan", "Japan", "Germany", "Germany", "Germany", …
Zeki Akyol
  • 193
  • 1
  • 1
  • 10
0
votes
1 answer

setting colors for geom_tile with both discrete and continuous variables

I am using geom_tile function from ggplot to visualise some spatial data. I have a continous variable region_relative_rainfall and discrete variable region. I would like to create a clear plot that has contrasting colors for each level of the…
Cyrillm_44
  • 701
  • 3
  • 17
0
votes
0 answers

R How to adjust the width and height of each band in geom_tile so it is proportional to geom_text and y axis

I'm trying to use geom_tile to plot a heatmap. Sample data. And the code is as follow: #define color library(wesanderson) pal <- wes_palette("Zissou1", 50, type = "continuous") b<- ggplot(C1.TN) d<- b + …
ML33M
  • 341
  • 2
  • 19
0
votes
1 answer

geom_tile failed when mappng soil_moisture in R

I have two soil moisture hdf images. The first one is 3Km resolution and the second one is 36km. Using same code, the second one can map in the following code as below: soil moisture in 36Km resolution The first one doesn't show the soil moisture…
guo_lll
  • 1
  • 2
0
votes
0 answers

Fixing the height and width of geom_tile elements in ggplot

I'm using a ggplot chart with geom_tile in RShiny. When I select a category with fewer y-axis elements, the tiles increase in height. I'd like to fix the tile height so that the chart height decreases when there are fewer y-axis elements, code…
Adam
  • 1
  • 1
0
votes
1 answer

ggplot in R - geom_tile with color-splitted tiles

Suppose I have a data where group1 and group2 both assign an integer value from 0 to 4 to the entities a,b,c,d,e, so: data <- data.frame(data_id = c(letters[1:5], letters[1:5]), data_group = c(replicate(5, "Group1"), replicate(5, "Group2")),…
W. Walter
  • 337
  • 1
  • 10
0
votes
1 answer

how to change geom_tile scale for very small values?

I have a dataframe containing some comparisons and the value represent the similarity between objects. I have a real object compared to some random ones which led to very small similarity. Also, I compared random objects versus random which led to…
gabt
  • 668
  • 1
  • 6
  • 20
0
votes
1 answer

Heat map soccer game in r

I have a dataframe with the position of a player on a pitch. The bounding box for the area is 0 - 1000 and 0 - 750. The starting ball position is 375-500 and the starting player position is 637-692. I was trying using geom_tile but I can't get a…
0
votes
1 answer

geom_tile in ggplot2 returning blank plot

I am trying to plot a dataset with three columns using the code below, but I get a blank figure with just the names on the axis, can anyone tell me what I am doing wrong? #rm(list=ls()) library(data.table) library(wesanderson) library(ggplot2) exa…
ndichistan
  • 27
  • 7
0
votes
0 answers

Ordering columns with geom_tiles

I've been looking around on the site to see if there were any previous posts about ordering columns on a heat map with geom_tiles. I am trying to create a heatmap that shows occurrences of certain scales of hydrologic research within different areas…
r1c3bowl22
  • 23
  • 6
1 2 3 4 5
6