Questions tagged [gplots]

Various R programming tools for plotting data

gplots: Various R programming tools for plotting data

164 questions
2
votes
1 answer

viridis with colorRampPalette output different vector lengths in R

I'm having some trouble to assign specific colors to a numeric vector. My interest is to use VAR1.color in as the ColSidecolors in heatmap.2. My data frame has 1655 rows with no missing values. I produce the colorRampPalette vector with the max…
RodrigoGM
  • 68
  • 5
2
votes
1 answer

How to add the diagonal line in depended vs predict plot in R

I performed regression analysis. Now i need create plot depended vs prediction, where depend is initial values of dependent var(mpg) and predict is predicted values. house_test=lm(mpg ~ 1 + hp + wt, data=mtcars) prediction <-…
psysky
  • 3,037
  • 5
  • 28
  • 64
2
votes
1 answer

Adjusting colour heatmap

I have a 8 rows and 5 columns CSV file that looks like…
2
votes
1 answer

Is it possible to get coordinates from network plots?

I'd like to reproduce a network graph with the same (or close) layout. I know that igraph has the tkplot.getcoords() function. I'd like to copy/get/set.seed a set of vertex coordinates based on the results of gplot, which is the SNA package's…
elliot
  • 1,844
  • 16
  • 45
2
votes
1 answer

R: Weighted Joyplot/Ridgeplot/Density Plot?

I am trying to create a joyplot using the ggridges package (based on ggplot2). The general idea is that a joyplot creates nicely scaled stacked density plots. However, I cannot seem to produce one of these using weighted density. Is there some way…
socialscientist
  • 3,759
  • 5
  • 23
  • 58
2
votes
1 answer

ColSideColors key for heatmap.2 function R

I have gone through the documentation of the heatmap.2() function in the gplots package in R looking for a way to code a color key for the ColSideColors argument. Is this supported? I would like to show which levels are represented by each color on…
skurp
  • 389
  • 3
  • 13
2
votes
1 answer

R - heatmap.2 (gplots): change colors for breaks

I generated a heatmap using heatmap.2 of the gplots package: library(gplots) abc <-read.csv(file="abc.txt", header=T, sep="\t", dec=".") abcm<-as.matrix(abc) def <-read.csv(file="def.txt", header=T, sep="\t", dec=".") defm<-as.matrix(def) mean…
rororo
  • 815
  • 16
  • 31
2
votes
1 answer

how to differentiate the colours for background and NA values in gplot

I am generating a chlorophyll map for lake. I want to fill the lake with blue colour where there is a very low chlorophyll concentration and light blue for NA values. I am using a code as given below gplot(Chlorophyll_map_5) +…
D.Banerjee
  • 91
  • 10
2
votes
1 answer

how to adjust the position of color legends in heatmap.2

I am trying to do an unbiased Hierarchical clustering with the following code col.cell <- c("purple","orange", "green", "blue")[sampleinf$subtype] heatmap.2(as.matrix(hm3),col=rev(morecols(50)),trace="none", main="Top 500 most variable genes across…
beginner
  • 411
  • 1
  • 5
  • 13
2
votes
1 answer

How to change heatmap column labels to symbols in R

As indicated in the title above, I want to change the column labels in the heatmap figure produced by heatmap.2 from package gplots in R to symbols rather than text. May I know if it is possible, and if so, how to do it? This is a sample code to…
fyr91
  • 1,253
  • 5
  • 17
  • 33
2
votes
1 answer

How to interpret heatmap key and histogram generated from heatmap.2?

Dear stackoverflow community, I have generated a heatmap on a random matrix from the following R code. I am having trouble interpreting the Color Key and Histogram at the top-left of the…
fyr91
  • 1,253
  • 5
  • 17
  • 33
2
votes
1 answer

R gplots: Heatmap with side colours

I want to create a heatmap using the heatmap.2 function from the gplots package. This is a minimal example. require(gplots) # create symmetric matrix x = matrix(rnorm(100), nrow=10) diag(x) <- 1 x[upper.tri(x)] <- …
Jonas
  • 1,639
  • 1
  • 18
  • 29
2
votes
0 answers

Heatmap displaying magnitude and p-value (R::ggplot2)

I would like to make a heatmap that displays both magnitude and p-value of the number in each box. I want the color of each cell to describe the value (v) and I want the thickness of the border of each cell to describe the p-value. df =…
user3030872
  • 367
  • 1
  • 6
  • 14
2
votes
1 answer

How to add a sample vertical line to in a gplot?

Consider the graph below given by this code: require(ggplot2) my_data<-c(70, 71, 75, 78, 78, 79, 80, 81, 84, 85, 87, 87, 90, 91, 95, 95, 96, 96, 97, 98, 98, 100, 101, 102, 102, 102, 102, 104, 104, 104, 107, 107, …
adhg
  • 10,437
  • 12
  • 58
  • 94
2
votes
1 answer

Interpreting the result of 'cutree' from hclust/heatmap.2

I have the following code that perform hiearchical clustering and plot them in heatmap. set.seed(538) # generate data y <- matrix(rnorm(50), 10, 5, dimnames=list(paste("g", 1:10, sep=""), paste("t", 1:5, sep=""))) # the actual data is much larger…
neversaint
  • 60,904
  • 137
  • 310
  • 477
1 2
3
10 11