Created
December 2, 2021 20:37
-
-
Save JohannesNE/3b892bc7d47159112c1a95845812bc94 to your computer and use it in GitHub Desktop.
Draw a lot of tangets to a sine function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Plots, Colors | |
f = sin | |
f´ = cos | |
p = plot(xlim = [-2pi, 7pi], | |
ylim = [-6,6], | |
lw= 0, | |
axis = nothing, border = :none) | |
for i in 0:0.01:5pi | |
p = plot!(p, x -> f´(i)*(x-i)+f(i), | |
color = RGB(i/5pi, ((1+i)%5pi)/5pi, 0.5), | |
alpha = 0.1, leg=false) | |
end | |
p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment