While plotting in R in QGIS, only the latest plot appears in 'Result viewer'. What do I do to get all the plots done during script running? Here's the code:
##showplots
bin_arr <- c("C:/Users/Madhur/Desktop/Screenshot_1.png", "C:/Users/Madhur/Desktop/Screenshot_2.png")
shp_arr <- c("C:/Users/Madhur/Desktop/SAR_Calibration/Screenshots_SAR/final.png", "C:/Users/Madhur/Desktop/SAR_Calibration/Screenshots_SAR/Screenshot_2.png")
library(imager)
im1<-load.image(bin_arr[2])
plot(im1)
im2<-load.image(shp_arr[1])
plot(im2)
im<-load.image(shp_arr[2])
plot(im)
I only get the plot corresponding to the last plot statement i.e. plot(im)
. I don't know if this is related or not but I ran the same script on cmd
using Rscript script-name.R
and not a single plot appeared.
Please help me show multiple plots in QGIS.