Skip to content

Commit

Permalink
update vorlage to match loesung for matshow in 2-numpy 2-indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
SepplL committed Jun 15, 2023
1 parent 9b4271b commit 4c4ebe0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions exercises-toolbox/2-numpy/2-indexing/vorlage.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Was das hier ist lernen wir noch, kann getrost ignoriert werden.
# In der Zwischenzeit, die Kurzfassung: Das 'macht' die Bilder. ;-)
fig, ax = plt.subplots(1, 1, layout="constrained")
ax.matshow(field, cmap="Set1", vmax=5, vmin=-1)
mat = ax.matshow(field, cmap="Set1", vmax=5, vmin=-1)
fig.savefig("Spielfeld_Beginn.pdf")

# Hier die Lösung für Aufgabe 1 und 2 eintragen (ein Beispiel ist angegeben):
Expand All @@ -39,6 +39,5 @@

# Was das hier ist lernen wir noch, kann getrost ignoriert werden.
# In der Zwischenzeit, die Kurzfassung: Das 'macht' die Bilder. ;-)
ax.cla()
ax.matshow(field, cmap="Set1", vmax=5, vmin=-1)
mat.set_array(field)
fig.savefig("Spielfeld_Ende.pdf")

0 comments on commit 4c4ebe0

Please sign in to comment.