Неразрешенные параметры с использованием Devise в Rails 4

Альтернатива heatmap:
library(gplots)

# need data as matrix
mm <- as.matrix(testdf, ncol = 3)

heatmap.2(x = mm, Rowv = FALSE, Colv = FALSE, dendrogram = "none",
          cellnote = mm, notecol = "black", notecex = 2,
          trace = "none", key = FALSE, margins = c(7, 11))

В heatmap.2 сторона графика, на которую будет нарисована axis, жестко закодирована. Но если вы наберете «heatmap.2» на консоли и скопируете вывод в редактор, вы можете выполнить поиск axis(1, где 1 является аргументом side (два раза). Затем вы можете перейти от 1 (ось ниже графика) к 3 (ось над графиком). Назначьте обновленную функцию новому имени, например. heatmap.3, и запустите его, как указано выше.

enter image description here [/g5]


Альтернатива addtable2plot

library(plotrix)

# while plotrix is loaded anyway:
# set colors with color.scale
# need data as matrix*
mm <- as.matrix(testdf, ncol = 3)
cols <- color.scale(mm, extremes = c("red", "yellow"))

par(mar = c(0.5, 1, 2, 0.5))
# create empty plot
plot(1:10, axes = FALSE, xlab = "", ylab = "", type = "n")

# add table
addtable2plot(x = 1, y = 1, table = testdf,
              bty = "o", display.rownames = TRUE,
              hlines = TRUE, vlines = TRUE,
              bg = cols,
              xjust = 2, yjust = 1, cex = 3)

# *According to `?color.scale`, `x` can be a data frame.
# However, when I tried with `testdf`, I got "Error in `[.data.frame`(x, segindex) : undefined columns selected".

enter image description here [/g6]


Альтернатива color2D.matplot

library(plotrix)
par(mar = c(0.5, 8, 3.5, 0.5))
color2D.matplot(testdf, 
                show.values = TRUE,
                axes = FALSE,
                xlab = "",
                ylab = "",
                vcex = 2,
                vcol = "black",
                extremes = c("red", "yellow"))
axis(3, at = seq_len(ncol(testdf)) - 0.5,
     labels = names(testdf), tick = FALSE, cex.axis = 2)
axis(2, at = seq_len(nrow(testdf)) -0.5,
     labels = rev(rownames(testdf)), tick = FALSE, las = 1, cex.axis = 2)

enter image description here [/g7]

После этого небольшого упражнения я склонен согласиться с @Drew Steen, что LaTeX альтернативы также могут быть исследованы. Например, здесь здесь и проверьте .

0
задан Remy Bartolotta 5 March 2015 в 19:16
поделиться