Hi all. Relatively new to Stan and R, so hopefully this is something simple for me to fix. Running in Rstudio, I generate a model fit using the ulam() function in the rethinking package, then run rstan::traceplot to generate plots, and then any further plots I generate use the formatting that came with the running of rstan::traceplot. For example, model m5.4 is an ulam, and I call rstan::traceplot directly as follows:
rstan::traceplot(m5.4, n_cols=1) plot(x_spur ~ x_real)
When I go to plot(x_spur ~ x_real) afterwords, the plot is squished into a vertically-small plot, which was what one of the sections (parameters) of the traceplot had as a format. The only way I know how to reset the formatting is to click the “Clear all plots” button in Rstudio.
a) Is rstan::traceplot() somehow “capturing” the Plots section of Rstudio and not releasing it after it’s done?
b) If so, how do I get the function to no longer dictate the layout of my next plots? That is, I only want rstan::traceplot to temporarily force 1-column formatting, then no longer force it after it’s done generating the plot.
I’m assuming that by calling traceplot directly using rstan:: that I’m not introducing anything from the rethinking package that I used to generate model m5.4. Is this how things work in R?