sigbertklinke / plot.matrix

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

Legend cut off #5

Open ggrothendieck opened 2 years ago

ggrothendieck commented 2 years ago

One Windows when I run this code the TRUE/FALSE in the legend are partially cut off

m <-structure(c(TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, 
FALSE, FALSE, TRUE, FALSE, FALSE, TRUE, TRUE), .Dim = c(3L, 5L))
library(plot.matrix)
plot(m)

I know this is mentioned in the help file and that I can add mar=c(4,4,4,4), say, to the plot call but it would be nice if the default provided something reasonable out of the box.

sigbertklinke commented 2 years ago

Hi,

if you have a look to the vignette you will see that you have always to do a par call before you call plot. And, I have no idea how I could calculate the length of the labels and to adapt the margins.

The next version will integrate a par call with the defaults used in the vignette.

ggrothendieck commented 2 years ago

Maybe the default legend should be below the chart?