Agent based model - create scatter plot with agent variables from data frame

Hello,

I’ve created an agent-based model where a Bank agent has randomly assigned variables of “uninsured,” "investments,"and “AFS_securities” that are collected in a data frame after running. I now want to create a 3D scatter plot with these values on the axes.

How can those variables be accessed if using PlotlyJ? I’m open to using Gadfly or Plots if more efficient.

This is the code for the data collection, then the scatter plot.

'''#specify the data to be collected for dataframe
adata = [:totDep, :vul, :health, :uninsured, :investments, :AFS_securities, :social_network]
mdata = [:num_vulnerable_banks, :num_failed_banks]

#initialize a model
testmodel = initialize(; n_banks = 20, n_depositors = 10)

#run the model for 5 time steps
adf, mdf = run!(testmodel, 10; adata, mdata);

#print the results for the model variables
mdf

#prinf the results for the agent variables
adf

#create scatter plot 
df = dataset(DataFrame, "adata")
plot(
    df,
    x=:uninsured, y=:investments, z=:AFS_securties, color=:acolor,
    type="scatter3d", mode="markers"
)'''

Thank you.

Please disregard my question, since I finally realized that “dataset” is a predetermined set of data, not a data frame that I created. I switched to using Gadfly and all is well.

Thank you.