def get_graph(self, function, num_graph_points = 40, **kwargs): kwargs["fill_opacity"] = kwargs.get("fill_opacity", 0) graph = VMobject(**kwargs) graph.set_points_smoothly([ self.coords_to_point(x, function(x)) for x in np.linspace(self.x_min, self.x_max, num_graph_points) ]) graph.underlying_function = function return graph