Skip to content

[help] terra plots going awry in targets #1308

Closed Answered by Aariq
geryan asked this question in Help
Discussion options

You must be logged in to vote

You're right. plot(raster) doesn't return the plot, but rather the output you see there.

library(terra)
#> terra 1.7.78
m <- matrix(1:25, nrow=5, ncol=5)
rm <- rast(m)
out <- plot(rm)

out
#> $ext
#> xmin xmax ymin ymax 
#>    0    5    0    5 
#> 
#> $lim
#> xmin xmax ymin ymax 
#>    0    5    0    5 
#> 
#> $add
#> [1] FALSE
#> 
#> $axs
#> $axs$las
#> [1] 0
#> 
#> $axs$cex.lab
#> [1] 0.8
#> 
#> $axs$line.lab
#> [1] 1.5
#> 
#> $axs$cex.axis
#> [1] 0.7
#> 
#> $axs$mgp
#> [1] 2.00 0.25 0.00
#> 
#> $axs$tcl
#> [1] -0.25
#> 
#> $axs$side
#> [1] 1 2
#> 
#> $axs$tick
#> [1] 1 2
#> 
#> $axs$lab
#> [1] 1 2
#> 
#> 
#> $draw_grid
#> [1] FALSE
#> 
#> $leg
#> $leg$digits
#> [1] 0
#> 
#> $leg$x
#> […

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Aariq
Comment options

Answer selected by geryan
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants