All Questions
14
questions
1
vote
2
answers
320
views
Customize legend with discrete labels for heatmap with continuous but binned data
I have created a heatmap in ggplot with continuous temperature data and scale_fill_viridis_c:
To make it easier to read I am testing a binned version with scale_fill_viridis_b and n.breaks:
My ...
1
vote
0
answers
213
views
Legend desepear when i use "scale_fill_gradientn" in ggplot2
I have a problem in my code somewhere but i can't figure out where it is.
I try to make a heatmap using p-adj values that i got from an ANOVA + Tukey test.
The thing is that the p-adj values range ...
0
votes
1
answer
143
views
heatplot in R with legend and significance
I am trying to plot a heatmap in R on a dataframe havin 4 rows and 25 columns.
dput(phenotype_MEs_spearman)
structure(c(0.775716994264046, 0.0910480716154271, -0.0514747882016944,
-0.169827441380469, ...
0
votes
0
answers
242
views
ggplot heatmap legend scale for multiple heatmaps in a shiny app
I have a shiny app, where I can generate 3 heatmaps depending on the selectinput field. The legend of heatmap 1 shows all 4 discrete variables "1" = "very good", "2" = &...
8
votes
3
answers
6k
views
R ggplot heatmap with multiple rows having separate legends on the same graph
I'm trying to make one heatmap using ggplot2 that contains 3 types of variables where each need their own independent legend/scale.
I am able to plot them all in one heatmap (pictured below), but I am ...
6
votes
2
answers
1k
views
Possible to force non-occurring elements to show in ggplot legend?
I'm plotting a sort of chloropleth of up to three selectable species abundances across a research area. This toy code behaves as expected and does almost what I want:
library(dplyr)
library(ggplot2)
...
6
votes
1
answer
6k
views
ggplot extend legend colorbar [duplicate]
I'm trying to make a heatmap on ggplot. I have a data frame similar to the one below
wday hour quant
Mon 0 1.2346944
Tue 0 0.8418860
Wed 0 0.8904375
Thu 0 0.8906767
Fri 0 1.0761553
...
3
votes
2
answers
1k
views
Multiple fill legends for each variable in heat map
I have an input file file1.txt:
V1 V2 Score
rs4939134 SIFT 1
rs4939134 Polyphen2 0
rs4939134 MutationAssessor -1.75
rs151252290 SIFT 0.101
rs151252290 Polyphen2 0.128
...
4
votes
2
answers
826
views
Controlling the shared legend when adding a ggplot dendrogram plot to a plotly heatmap
I have genes x samples expression data I'd like to generate a plotly heatmap for and add the samples dendrogram ggplot to.
Here are my data:
set.seed(1)
mat <- matrix(rnorm(100*10),100,10,...
11
votes
3
answers
2k
views
A shared legend for z-scores and corresponding p-values in a heatmap
I have a z-scores matrix:
set.seed(1)
z.score.mat <- matrix(rnorm(1000),nrow=100,ncol=10)
which are the result of some biological experimental data, and a corresponding p-value matrix:
p.val.mat ...
0
votes
1
answer
1k
views
Have same heat legend for two different heatmap plots, ggplot2, Rstudio
Summary and info of Problem
I have two big datasets (as in a matrix-layout but keeping them as df-s) with 100 columns and 11640 rows. Each row represent time hourly and each column a specific depth. ...
1
vote
0
answers
516
views
Colors in legend of heat map plot do not appear
I am using R and create the following heat map plot:
library(reshape2)
library(ggplot2)
require(gridExtra)
library(RColorBrewer)
colors <- brewer.pal(9, 'Reds')
sample_data <- data.frame(...
3
votes
1
answer
3k
views
ggplot heatmap legend doesn't represent negative numbers
I'm trying to make a heat map for a data set that includes negative numbers:
Ne BR Error
10000 0.00001 1.62
10000 0.000001 -1.03
10000 0.0000001 -0.124
100000 0.00001 ...
3
votes
1
answer
8k
views
plotting heatmaps with ggplot2; logscale color and modify color legend
I am trying to create a heatmap with ggplot2 (you see the code below)
Now there are two things i want to change:
I plot pValues (which are hopefully very small) so i want plot the colors logscale. i ...