Skip to content

Commit

Permalink
Update example scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
WardBrian committed Nov 4, 2024
1 parent 107bf5e commit 4733e23
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gui/src/app/Scripting/Analysis/analysis_template.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ install.packages("bayesplot")
library(bayesplot)

mcmc_hist(draws, pars = c("lp__"))

# can also access data.json
data <- jsonlite::read_json("./data.json")
data
7 changes: 7 additions & 0 deletions gui/src/app/Scripting/Analysis/analysis_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@
plt.hist(samples.ravel(), bins=30)
plt.title("lp__")
plt.show()

# you can also read data.json
import json

with open("data.json") as f:
data = json.load(f)
print(data)

0 comments on commit 4733e23

Please sign in to comment.