Skip to content

Missing legends/text on plot(map) #145

@drserajames

Description

@drserajames

When using plot(map), the borders of the plot can not have text or a legend on them. Resolved by setting par(mar=rep(0,4)) prior to calling plot.

> library(Racmacs)
> packageVersion("Racmacs")
[1] ‘1.1.38’
> 
> set.seed(123)
> dat <- matrix(10*2^round(10*runif(100)), ncol=10)
> set.seed(456)
> map <- make.acmap(dat, verbose=F, options=list(report_progress = F))
> plot(map)
> legend("bottomleft", c("lots", "of", "important", "things"))
> legend("bottomright", c("lots", "of", "important", "things"))
> legend("topleft", c("lots", "of", "important", "things"))
> legend("topright", c("lots", "of", "important", "things"))
> text(0,0, "Cos I wonder where you are")
> text(-5, 5, "Is it me you're looking for?")
> text(-5, 7.2, "Hello")

Rplot01

par(mar=rep(0,4))
plot(map)
legend("bottomleft", c("lots", "of", "important", "things"))
legend("bottomright", c("lots", "of", "important", "things"))
legend("topleft", c("lots", "of", "important", "things"))
legend("topright", c("lots", "of", "important", "things"))
text(0,0, "Cos I wonder where you are")
text(-5, 5, "Is it me you're looking for?")
text(-5, 7.2, "Hello")

Rplot02

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions