From 43378c55cf900909d2e09eca87f218949ae3dedc Mon Sep 17 00:00:00 2001 From: yangyonggit Date: Mon, 22 May 2023 15:41:14 +0800 Subject: [PATCH] -fix NameError: name 'colors_j' is not defined. --- Book4_Ch13_Python_Codes/Bk4_Ch13_03.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Book4_Ch13_Python_Codes/Bk4_Ch13_03.py b/Book4_Ch13_Python_Codes/Bk4_Ch13_03.py index b9ea075..de735df 100644 --- a/Book4_Ch13_Python_Codes/Bk4_Ch13_03.py +++ b/Book4_Ch13_Python_Codes/Bk4_Ch13_03.py @@ -43,7 +43,7 @@ [5*np.sin(theat_i)]]) plt.plot(x[0],x[1], - marker = 'x',color = colors_j, + marker = 'x',color = colors[j,:], markersize = 15) # plot the initial point @@ -68,3 +68,4 @@ ax.spines['left'].set_visible(False) ax.axvline(x=0,color = 'k') ax.axhline(y=0,color = 'k') +plt.show()