mirror of
https://github.com/gsi-upm/soil
synced 2024-11-22 03:02:28 +00:00
Update tutorial and fix plotting bug
This commit is contained in:
parent
47a67f6665
commit
eca4cae298
File diff suppressed because one or more lines are too long
@ -21,8 +21,10 @@ def plot(env, agent_df=None, model_df=None, steps=False, ignore=["agent_count",
|
||||
except UserWarning:
|
||||
print("No agent dataframe provided and no agent reporters found. Skipping agent plot.", file=sys.stderr)
|
||||
return
|
||||
agent_df.unstack().apply(lambda x: x.value_counts(),
|
||||
axis=1).fillna(0).plot(ax=ax, secondary_y=True);
|
||||
if not agent_df.empty:
|
||||
agent_df.unstack().apply(lambda x: x.value_counts(),
|
||||
axis=1).fillna(0).plot(ax=ax,
|
||||
secondary_y=True)
|
||||
|
||||
|
||||
Results = namedtuple("Results", ["config", "parameters", "env", "agents"])
|
||||
|
Loading…
Reference in New Issue
Block a user