For ggplot you have to collect your data into a dataframe. I usually use a loop for this. Not sure exactly what you're trying to plot.
library(tidyverse)
theta_seq <- c(0.1, 0.2, 0.3)
ntheta <- length(theta_seq)
nsamples <- 5
df <- vector("list", ntheta*nsamples) # create an empty list for the results
for (i in 1:ntheta){
for (j in 1:nsamples){
xsim <- rnorm(100,1,1)
logl <- function(theta){
(10/2)*log(2*pi*theta^2)+sum((xsim-theta)^2/(2*theta^2))
}
df[[j+(i-1)*nsamples]] <- tibble(theta=theta_seq[i], sample=j, logl=logl(theta_seq[i]))
}
}
df <- bind_rows(df) # convert the list to a dataframe
ggplot(df) +
geom_line(aes(x=theta, y=logl, colour=as.factor(sample)))