Questions tagged [gplots]

Various R programming tools for plotting data

gplots: Various R programming tools for plotting data

164 questions
50
votes
3 answers

How to set use ggplot2 to map a raster

I would like to make a plot using R studio similar to the one below (created in Arc Map) I have tried the following code: # data processing library(ggplot2) # spatial library(raster) library(rasterVis) library(rgdal) # test <-…
mr. cooper
  • 810
  • 1
  • 9
  • 15
33
votes
2 answers

Moving color key in R heatmap.2 (function of gplots package)

I read the heatmap.2 help manual a couple of times now, and also in various online tutorials I didn't read about a way to move the color key to a different position. Now, I am wondering if it is even possible? The color key is in the upper left…
user2015601
13
votes
5 answers

Error while creating heatmaps - NA/NaN/Inf in foreign function call (arg 11)

I'm trying to prepare heatmap for my data but I have no idea why this error appears. My data: > dput(head(tbl_ready)) structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.370330677123077, 0, 0, 0, 0, 0, 0.53318856142826, 0, 0, 0, 0, 0,…
Shaxi Liver
  • 1,052
  • 3
  • 25
  • 47
13
votes
5 answers

creating a heatmap where the data has NaN values in it

I am trying to create a heatmap using the heatmap.2 package. My data has lot's of NaN values in it, and what I would like to do is the following. Every time there is a NaN value, simply have the cell be colored as light grey (or some other neutral…
user1352084
  • 459
  • 3
  • 6
  • 13
12
votes
1 answer

Multiple RowSideColor columns heatmap.2 from gplots package

I would like to be able to have use two RowSideColor bars with the heatmap.2 function from the R package plots, but I can't figure out how to do it. I've seen this question asked before on stack overflow, and while the question was responded to,…
Brad Davis
  • 1,063
  • 3
  • 18
  • 38
11
votes
2 answers

draw cell borders using heatmap.2

I'm trying to make a heatmap using heatmap.2 but I don't get a cell border. If I set the parameter sepwidth and sepcolor it does not work, I have to include the colsep and rowsep parameters but still doing that, some cell borders are not drawn, any…
user2380782
  • 1,542
  • 4
  • 22
  • 60
8
votes
2 answers

Figure object have no attribute set_title

I have used stem_graphic to plot a stem and leaf plot and saved it to pdf but when trying to enter title its giving error: Figure object have no attribute set_title. ax, b=stem_graphic(mileage['disp']) ax.set_title("Vicky") This is the…
Vicky Choudhary
  • 81
  • 1
  • 1
  • 2
8
votes
1 answer

Why heatmap.2 in R failed to read the numeric data frame?

I have the following data GOBPID Term col1 col2 col3 col4 col5 GO:0001659 temperature_homeostasis 3.49690559977475 0 0 0 0 GO:0001660 fever_generation 3.22606939096511 0 0 0 0 which I tried to read with heatmap.2…
neversaint
  • 60,904
  • 137
  • 310
  • 477
6
votes
3 answers

How to color the branches and tick labels in the heatmap.2?

I have done a Heat Map using the function heatmap.2 of gplots in R, but I don't have an idea of how to coloring the branches and tick labels per groups (Eg. if I cut the tree to have four gruops like in my second figure). I have checked that it is…
Darwin PC
  • 871
  • 3
  • 23
  • 34
5
votes
0 answers

How to have a legend for colored edges in Julia plots?

Here is a minimal working code from Julia Discourse: using LightGraphs using GraphPlot using Colors g = graphfamous("karate") membership = [1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,2,1,1,2,1,2,1,2,1,1,1,1,2,1,1,2,1,1,1] nodecolor = [colorant"lightgrey",…
JKHA
  • 1,800
  • 11
  • 28
5
votes
1 answer

How can I make the Venn-Diagram colourful in R {venn-gplots}?

I used venn function in gplots library. here is a simple example. library(gplots) venn( list(A=1:5,B=4:6,C=c(4,8:10),D=c(4:12)) ) and here is the output: my question is how can I make this picture colourful for each group? (basically make it more…
user3576287
  • 932
  • 3
  • 16
  • 30
4
votes
1 answer

Problems scaling axis tick labels when plotting with plotCI

I am plotting points and confidence intervals using the plot function plotCI from the 'gplots' package, but I cannot find the right way to manipulate the tick label sizes. Here's my data frame 'bb': DPUT(bb) structure(list(Year = c(1970, 1971, 1972,…
Dag
  • 569
  • 2
  • 5
  • 20
4
votes
1 answer

Make row labels italic in heatmap.2

I'm trying to make my row labels italic using the R function heatmap.2. There's no default option and I can't figure out a work around by setting par(font=3) for example. How can I set my row labels to be italic in heatmap.2? set.seed(123) data =…
Erik
  • 123
  • 2
  • 7
4
votes
1 answer

How to set axis label size in gplots heatmap.2?

I could not find a way to set axis label size for the heatmap itself. The cex.lab argument passed to heatmap.2 has no effect. Calling par(cex.lab = 2.5) has an effect on the legend axis labels and title (these all together, I can`t imagine what if…
deeenes
  • 4,148
  • 5
  • 43
  • 59
4
votes
2 answers

Colour specific node in igraph

I am trying to colour node 6 and 7 regardless of whatever letter is selected from object 'd'. g <- graph_from_literal(1:2:3:4:5 -- 6:7) # Rename (sum up all the vertices) d <- c("a", "b", "c", "d", "e", "f", "g","h", "i", "j") V(g)$name <-…
Sam
  • 261
  • 2
  • 12
1
2 3
10 11