Questions tagged [gplots]

Various R programming tools for plotting data

gplots: Various R programming tools for plotting data

164 questions
1
vote
1 answer

How to adjust the color range in heatmap.2

I am trying to plot the heatmap using the R language. After plotting the heatmap graph, I found that the my heatmap was not appropriate for the interpretation because the range of the color key was not well adjusted. As you can see below, the color…
sclee1
  • 1,095
  • 1
  • 15
  • 36
1
vote
1 answer

R - plotting thumbnails (that are in a list) on a scatterplot

I'd like to plot a set of thumbnail images as points on a scatterplot. I've started with the answer code located here but they repeat the same thumbnail throughout the plot, whereas I have a list of images. xy <- data.frame(x=runif(337, 0, 100),…
val
  • 1,629
  • 1
  • 30
  • 56
1
vote
0 answers

How to apply nice LDplot?

I have data as below. I have found linkage disequilibrium (LD) between my data (chromosomes positions) and Now I like draw a plot like heatmap or other plots that show relation between columns S1 and S2. Input: S1 S2 R^2 1…
tob
  • 95
  • 7
1
vote
1 answer

Adding axis titles in gplot using filled.contour in R

This is my reproducible code example. Everything looks as it should in the graph, except the axis titles/labels are not being added. I am really struggling to figure out how to fix it, despite following the directions in the function documentation.…
mihoo
  • 157
  • 3
  • 12
1
vote
1 answer

R gplots heatmap.2 - key is unstable using breaks parameter (warning: unsorted 'breaks' will be sorted before use)

I'm visualizing a data set with the heatmap.2 function from the gplots package in R. Basically I'm performing a hierarchical clustering analysis on the original data, while forcing the heatmap to display a limited version of the data (between -3…
user26665
  • 325
  • 3
  • 14
1
vote
0 answers

When I use textplot() and title() after pdf(), my output has the table but not the title. How can I make the title appear?

I am using the following code in R with the gplots package: pdf("filepath") plot(graph) textplot(table, cmar=1) title("My title") dev.off() My goal is to have a 2-page pdf file with the plot on page 1 and the table with a title on page 2. …
Matt
  • 23
  • 3
1
vote
1 answer

Suppressing error message from heatmap.2 in knitr/Rmarkdown

I am trying to generate a plot using heatmap.2 and print to a pdf_document using Rmarkdown. Whether I call heatmap.2 from the console or in an .Rmd, the plot appears perfectly exactly as I want it. But additionally, I receive the error message: ##…
Jeff
  • 12,147
  • 10
  • 51
  • 87
1
vote
0 answers

Heatmap, multiple variable types, scaling in R

Basically I want to know if I can generate a heatmap where the color scales are based on the range of values in each column. The solution does not necessarily have to do any clustering or produce a dendrogram. I have a data frame with a range of…
chilland
  • 69
  • 1
  • 7
1
vote
0 answers

I cannot launch shiny from web

I have installed shiny server following the tutorial:here. The server was started automatically, as shown in the following message: shiny-server start/running, process 9376 I then created a folder on /etc/shiny-server and the file shiny-server.conf…
1
vote
1 answer

Customize range heatmap.2

I am using the heatmap.2 function from the "gplots" package and would like to tweak the vizual output. I would like to get a symmetric color scheme and I have achieved that using the scale="row" option. However, when doing this, my range gets…
jensjorda
  • 183
  • 2
  • 3
  • 10
1
vote
1 answer

How do I position a central subtitle in my two-sided gplot-pyramid?

I created an age-sex-pyramid using gplots. I would like to center a subtitle between the two sides of the pyramid. However, I can only get the subtitle aligned with one of the two sides of the pyramid: library(gplots) agetable <- as.data.frame(cbind…
Anita
  • 11
  • 3
1
vote
2 answers

How to wrap colnames without covering first row?

How can I plot a text that wraps and covers two lines in such a way that it does not cover the next row? Here's an example: library(gplots) a <- data.frame(a = c(1,2,3), b = c(4,5,6)) colnames(a)[1] <- "wrap\ntext" textplot(a) It can be easily…
Wilmer E. Henao
  • 4,094
  • 2
  • 31
  • 39
1
vote
0 answers

R: replot heatmap produced with heatmap.2

I store the results returned by heatmap.2 (in gplots library) like this: hm <- heatmap.2(M) Is it possible to replot the heatmap at a later time like: plot(hm), heatmap(hm)?
lucacerone
  • 9,859
  • 13
  • 52
  • 80
1
vote
1 answer

How to change xmax and xmin in histogram part of heatmap.2 plot from the R package gplots?

I have multiple heat maps similar to the following: X <- matrix(nrow=3, ncol=3) X[1,] <- c(0.3, 0.4, 0.45) X[2,] <- c(0.3, 0.7, 0.65) X[3,] <- c(0.3, 0.4, 0.45) colnames(X)<-c(1.5, 3, 4) rownames(X)<-c(1.5, 3, 4) library(gplots) heatmap.2( X,…
jonalv
  • 5,706
  • 9
  • 45
  • 64
1
vote
0 answers

Is there a function in R equivalent to textplot() for printing S4 objects to PDF?

I have several random effects models fit by lmer (lme4 package). For example: a.1=lmer(songTrait ~ 1 + (1|Year) + (1|ID), REML=F) a.2=lmer(songTrait ~ Date + (1|Year) + (1|ID), REML=F) I would like to print the table summaries of these models,…
mattador
  • 421
  • 4
  • 12