Skip to content

plot(<Quadtree>): legend doesn't show when alpha is small #11

@dfriend21

Description

@dfriend21

Example:

data(habitat)
qt <- quadtree(habitat, .1)
plot(qt, crop = TRUE, alpha = .05, border_col = "transparent")

image

The following error is shown:

Error in graphics::rasterImage(rast, bar_x0, bar_y0, bar_x1, bar_y1, xpd = TRUE) : 
  invalid RGB specification 

6. graphics::rasterImage(rast, bar_x0, bar_y0, bar_x1, bar_y1, xpd = TRUE) at plot_Quadtree.R#416
5. (function (zlim, col, alpha = 1, lgd_box_col = NULL, lgd_x_pct = 0.5, 
    lgd_y_pct = 0.5, lgd_wd_pct = 0.5, lgd_ht_pct = 0.5, bar_box_col = "black", 
    bar_wd_pct = 0.2, bar_ht_pct = 1, text_cex = 1, text_col = NULL, 
    text_font = NULL, text_x_pct = 1, ticks = NULL, ticks_n = 5)  ... 
4. do.call(add_legend, legend_args) at plot_Quadtree.R#239
3. .local(x, ...) 
2. plot(qt, crop = TRUE, alpha = 0.05, border_col = "transparent") 
1. plot(qt, crop = TRUE, alpha = 0.05, border_col = "transparent") 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions