Which of the following code snippets correctly initializes a 3D wireframe plot in matplotlib?
Afig = plt.figure()
ax = fig.add_subplot(111)
ax.plot_wireframe(X, Y, Z)
Bfig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_wireframe(X, Y, Z)
Cfig = plt.figure()
ax = fig.add_subplot(111, projection='2d')
ax.plot_wireframe(X, Y, Z)
Dfig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(X, Y, Z)