-
-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reusing function names keeps potting "old" function #508
Comments
Oh boy, my code got destroyed, here again safe mode for better copy paste: t = linspace(0, 10, 100) f(x) = x^2 |
This is not Plots fault: JuliaLang/julia#18076 etc. For some reason this got worse on 0.5. |
Yeah that's weird... I can reproduce. Note that if you don't do that first plot command then the second plot works. Glad to hear it's not my fault :) |
Yeah, it's a Base thing. It also messes up on conditionals: JuliaLang/julia#16965 It's because of how they changed function compilation in v0.5. The easy answer is, if you want to overwrite f = (x) -> x^2 Then you can overwrite it without worry. In v0.5, anonymous functions compile so there's no performance loss by doing this. |
`t = linspace(0, 10, 100)
f(x) = x
plot(t, f); gui()
print("Press Enter for 2nd plot"); readline()
now i want a quadratic plot
f(x) = x^2
plot(t, f); gui()`
Hello, i keep having troubles when redefining functions and plotting them. The plot function does not seem to realise the redefinition and keeps plotting the "old" function. E.g. in the example above, the linear function is plotted twice, instead of the quadratic plot. I'm using Julia 0.5.0 and Plots 0.9.3
The text was updated successfully, but these errors were encountered: