Skip to content

Commit

Permalink
Add title to figures
Browse files Browse the repository at this point in the history
  • Loading branch information
santiag0m committed Mar 25, 2022
1 parent 54fd28c commit 6953c76
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions synthetic_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def multiple_trials(experiment_config: Dict, num_trials: int) -> Dict:
return results


def plot_results(results: List[Dict]):
def plot_results(results: List[Dict], title: str = ""):
plt.ion()

keys = results[0].keys()
Expand All @@ -155,6 +155,7 @@ def plot_results(results: List[Dict]):
data=df, x="num_of_samples", y="L2", marker="o", ci=95, label=key
)
ax.set(xscale="log")
ax.set_title(title)


def main(
Expand Down Expand Up @@ -188,7 +189,7 @@ def main(
)
results.append(exp_results)

plot_results(results)
plot_results(results, title=noise_distribution)


if __name__ == "__main__":
Expand Down

0 comments on commit 6953c76

Please sign in to comment.