sigbertklinke / plot.matrix

Visualizes a matrix object plainly as heatmap. It provides a single S3 function plot for matrices.
8 stars 3 forks source link

Key behavior #1

Closed fdchevalier closed 5 years ago

fdchevalier commented 5 years ago

Dear Sigbert,

First, thank you for making the plot.matrix package. It has been very useful to me these past few days.

When using it, I noticed what I suspect to be an unexpected behavior regarding key plotting. Here is a reproducible example:

library(plot.matrix)
x <- matrix(runif(35), ncol=5)
plot(x, key=NULL)             # No key plotted as expected
plot(x, key=NULL, digit=1)    # The key is plotted despite key=NULL

I found a very simple fix by modifying the line 197 of plot.matrix.R (this is actually the only line modified despite diff showing more modifications).

Hope this helps.

Fred