Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
UvA DL Tutorial 3: Fixing matplotlib 3d plots
  • Loading branch information
phlippe committed Jan 4, 2023
commit 456aad96a1141e09141ec6c11b8b1c6b86f70698
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ def plot_curve(
curve_fn, x_range=(-5, 5), y_range=(-5, 5), plot_3d=False, cmap=cm.viridis, title="Pathological curvature"
):
fig = plt.figure()
ax = fig.gca(projection="3d") if plot_3d else fig.gca()
ax = plt.axes(projection='3d') if plot_3d else plt.axes()

x = torch.arange(x_range[0], x_range[1], (x_range[1] - x_range[0]) / 100.0)
y = torch.arange(y_range[0], y_range[1], (y_range[1] - y_range[0]) / 100.0)
Expand Down