Skip to content

Instantly share code, notes, and snippets.

@uwezi
Created September 1, 2024 22:00
Show Gist options
  • Save uwezi/9589da836d8eda4d3575be6e4903e984 to your computer and use it in GitHub Desktop.
Save uwezi/9589da836d8eda4d3575be6e4903e984 to your computer and use it in GitHub Desktop.
[lambda plot] comparing functions and lambda functions. #manim #plot #axes #lambda #function
from manim import *
class plotter(Scene):
def construct(self):
def func(x):
return 2*np.sin(x)
ax = Axes()
pl1 = ax.plot(func)
pl2 = ax.plot(
lambda x: 2*np.cos(x)
)
self.add(ax,pl1,pl2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment