Skip to content

Commit

Permalink
Update RollDieDynamic.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pdeitel authored Jul 8, 2024
1 parent 31dc3bc commit f5eebab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/lesson06/RollDieDynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def update(frame_number, rolls, faces, frequencies):

# reconfigure plot for updated die frequencies
plt.cla() # clear old contents contents of current Figure
axes = sns.barplot(faces, frequencies, palette='bright') # new bars
axes = sns.barplot(x=faces, y=frequencies, palette='bright') # new bars
axes.set_title(f'Die Frequencies for {sum(frequencies):,} Rolls')
axes.set(xlabel='Die Value', ylabel='Frequency')
axes.set_ylim(top=max(frequencies) * 1.10) # scale y-axis by 10%
Expand Down

0 comments on commit f5eebab

Please sign in to comment.