R tool in Alteryx not rendering Graph

I used the below code in R tool from Alteryx just to visualize a simple chart. The code ran okay but when I browse the output from the R tool, it is empty and couldn’t view any chart using the browse tool

cond.install <- function(package.name){
options(repos = "http://cran.rstudio.com")
if(package.name%in%rownames(installed.packages())==FALSE) {
install.packages(package.name)}else{require(package.name, character.only = TRUE)}}
cond.install("ggplot2")
library("ggplot2")
library("data.table")
Data<-data.table(read.Alteryx("#1",mode = "data.frame"))
setDT(Data)
write.Alteryx(Data, 1)
AlteryxGraph(2, width=576, height=576)
Plot<-ggplot(Data,mapping=aes(x=Time,y=Value,color= 'Family Name'))
invisible(dev.off()) 

Could someone please help me why I couldn’t view the chart output in Alteryx Thank you