@@ -23,7 +23,7 @@ function bsplines_cardinal_splines()
2323 csubplot (5 ,1 ,k,nox= k< 5 ) do
2424 for j = 1 : size (χ,2 )
2525 ϕ = view (χ, :, j)
26- l= plot (x, ϕ)[ 1 ]
26+ l= first ( plot (x, ϕ))
2727 Bspline_text (x, ϕ, j, k, l. get_color ())
2828 end
2929 ylabel (latexstring (" k = $k " ))
@@ -68,7 +68,7 @@ function bsplines_full_multiplicity_splines()
6868 csubplot (5 ,1 ,k,nox= k< 5 ) do
6969 for j = 1 : size (χ,2 )
7070 ϕ = view (χ, :, j)
71- l= plot (x, ϕ)[ 1 ]
71+ l= first ( plot (x, ϕ))
7272 Bspline_text (x, ϕ, j, k, l. get_color ())
7373 end
7474 ylabel (latexstring (" k = $k " ))
@@ -101,7 +101,7 @@ function bsplines_spline1d()
101101 csubplot (312 , nox= true ) do
102102 for j = 1 : size (χ,2 )
103103 ϕ = view (χ, :, j)
104- l= plot (x, ϕ)[ 1 ]
104+ l= first ( plot (x, ϕ))
105105 Bspline_text (x, ϕ, j, k, l. get_color ())
106106 end
107107 margins (0.1 ,0.1 )
@@ -223,15 +223,15 @@ function bsplines_restricted_basis_interpolation()
223223 yl = nothing
224224 cfigure (" restricted basis interpolation" , figsize= (7 ,9 )) do
225225 csubplot (321 , nox= true ) do
226- l= plot (x, χ* c1)[ 1 ]
226+ l= first ( plot (x, χ* c1))
227227 plot (x_avg, c1, " s:" , color= l. get_color ())
228- l= plot (x, χ* c2)[ 1 ]
228+ l= first ( plot (x, χ* c2))
229229 plot (x_avg, c2, " s:" , color= l. get_color ())
230230 end
231231 csubplot (322 , nox= true ) do
232- l= plot (x, χ̃* c̃1)[ 1 ]
232+ l= first ( plot (x, χ̃* c̃1))
233233 plot (x̃_avg, c̃1, " s:" , color= l. get_color ())
234- l= plot (x, χ̃* c̃2)[ 1 ]
234+ l= first ( plot (x, χ̃* c̃2))
235235 plot (x̃_avg, c̃2, " s:" , color= l. get_color ())
236236 axes_labels_opposite (:y )
237237 end
@@ -377,12 +377,12 @@ function bsplines_sine_derivative()
377377
378378 cfigure (" derivatives" , figsize= (7 ,9 )) do
379379 csubplot (411 ,nox= true ) do
380- l= plot (x, χ* cf, label= L "\t ilde{f}(x)" )[ 1 ]
380+ l= first ( plot (x, χ* cf, label= L "\t ilde{f}(x)" ))
381381 plot (x, f .(x), " :" , label= L " f(x)" )
382382 legend (framealpha= 0.75 )
383383 end
384384 csubplot (412 ,nox= true ) do
385- l= plot (x, (χ* cg), label= L "\t ilde{g}(x)" )[ 1 ]
385+ l= first ( plot (x, (χ* cg), label= L "\t ilde{g}(x)" ))
386386 plot (x, g .(x), " :" , label= L " g(x)" )
387387 legend (framealpha= 0.75 )
388388 end
@@ -426,28 +426,28 @@ function bsplines_ode_hookes_law(xₘₐₓ, kspring, k, N)
426426
427427 cfigure (" Hooke's law" ,figsize= (7 ,9 )) do
428428 csubplot (411 ,nox= true ) do
429- l= plot (x, χ* cF, label= L "\t ilde{F}(x)" )[ 1 ]
429+ l= first ( plot (x, χ* cF, label= L "\t ilde{F}(x)" ))
430430 plot (- x, - χ* cF, " --" , color= l. get_color ())
431431 plot (x_avg, cF, " .:" , color= l. get_color (), label= L " c_F" )
432432 plot (x, F .(x), " :" , label= L " F(x)" )
433433 legend (framealpha= 0.75 )
434434 end
435435 csubplot (412 ,nox= true ) do
436- l= plot (x, χ* cV, label= L "\t ilde{V}(x)" )[ 1 ]
436+ l= first ( plot (x, χ* cV, label= L "\t ilde{V}(x)" ))
437437 plot (- x, χ* cV, " --" , color= l. get_color ())
438438 plot (x_avg, cV, " .:" , color= l. get_color (), label= L " c_V" )
439439 plot (x, V .(x), " :" , label= L " V(x)" )
440440 legend (framealpha= 0.75 )
441441 end
442442 csubplot (413 ,nox= true ) do
443443 plot (x, χ* cV - V .(x))
444- xl = xlim ()
444+ xl = pyconvert (Tuple, xlim () )
445445 xlim (- xl[2 ],xl[2 ])
446446 ylabel (" Error" )
447447 end
448448 csubplot (414 ) do
449449 plot (x, χ)
450- xl = xlim ()
450+ xl = pyconvert (Tuple, xlim () )
451451 xlim (- xl[2 ],xl[2 ])
452452 xlabel (L " x" )
453453 end
0 commit comments