Skip to content
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

Fix fig.gca(projection = '3d') #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions 2D Burgers Equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
print(lineSingle)

fig = pyplot.figure(figsize=(11,7),dpi=100) #Initializing the figure
ax = fig.gca(projection='3d')
ax = fig.add_subplot(projection = '3d')
X,Y = numpy.meshgrid(x,y)

ax.plot_surface(X,Y,u[:],cmap=cm.viridis,rstride=1,cstride=1)
Expand Down Expand Up @@ -98,7 +98,7 @@
print(lineSingle)

fig = pyplot.figure(figsize=(11,7),dpi=100)
ax = fig.gca(projection='3d')
ax = fig.add_subplot(projection = '3d')

X,Y = numpy.meshgrid(x,y)
ax.plot_surface(X,Y,u[:],cmap=cm.viridis,rstride=1,cstride=1)
Expand Down
4 changes: 2 additions & 2 deletions 2D Diffusion Equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@


fig = pyplot.figure()
ax = fig.gca(projection='3d')
ax = fig.add_subplot(projection = '3d')
X,Y = numpy.meshgrid(x, y)
surf = ax.plot_surface(X,Y,u, rstride=1, cstride=1, cmap=cm.viridis, linewidth=0, antialiased=False)

Expand Down Expand Up @@ -79,7 +79,7 @@
print(lineSingle)

fig = pyplot.figure()
ax = fig.gca(projection='3d')
ax = fig.add_subplot(projection = '3d')
surf = ax.plot_surface(X,Y,u[:], rstride=1, cstride=1, cmap=cm.viridis,linewidth=0, antialiased=True)
ax.set_zlim(1, 2.5)

Expand Down
2 changes: 1 addition & 1 deletion 2D Laplace Equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def plot2D(x, y, p):

fig = pyplot.figure(figsize=(11,7),dpi=100)
ax = fig.gca(projection='3d')
ax = fig.add_subplot(projection = '3d')

X,Y=numpy.meshgrid(x,y) #Generating 2D Mesh

Expand Down
6 changes: 3 additions & 3 deletions 2D Linear Convection Equation .py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
print(lineSingle)

fig = pyplot.figure(figsize=(11, 7), dpi=100) #innitilize plot window
ax = fig.gca(projection = '3d') #defining axis is 3d
ax = fig.add_subplot(projection = '3d') #defining axis is 3d
X,Y = numpy.meshgrid(x, y) #Generating 2D Mesh

#assign plot window the axes label ax, specifies its 3d projection plot
Expand Down Expand Up @@ -95,7 +95,7 @@
print(lineSingle)

fig = pyplot.figure(figsize=(11,7), dpi=100)
ax = fig.gca(projection = '3d')
ax = fig.add_subplot(projection = '3d')
surf2 = ax.plot_surface(X, Y, u[:], cmap=cm.viridis)
ax.set_title('Method - I:Using Nested FOR Loop')
ax.set_xlabel('X Spacing')
Expand Down Expand Up @@ -133,7 +133,7 @@
print(lineSingle)

fig = pyplot.figure(figsize=(11,7), dpi = 100)
ax = fig.gca(projection = '3d')
ax = fig.add_subplot(projection = '3d')
surf3 = ax.plot_surface(X, Y, u[:], cmap = cm.viridis)
ax.set_title('Method - II: Using ARRAYS Operation')
ax.set_xlabel('X Spacing')
Expand Down
4 changes: 2 additions & 2 deletions 2D Non Linear Convection Equation .py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
print(lineSingle)

fig = pyplot.figure(figsize=(11, 7), dpi = 100)
ax = fig.gca(projection = '3d')
ax = fig.add_subplot(projection = '3d')
X,Y = numpy.meshgrid(x, y) #Generating 2D Mesh

ax.plot_surface(X, Y, u[:],cmap=cm.viridis, rstride=2, cstride=2)
Expand Down Expand Up @@ -83,7 +83,7 @@
print(lineSingle)

fig = pyplot.figure(figsize=(11, 7), dpi = 100)
ax = fig.gca(projection = '3d')
ax = fig.add_subplot(projection = '3d')
X,Y = numpy.meshgrid(x, y)

ax.plot_surface(X, Y, u[:],cmap=cm.viridis, rstride=2, cstride=2)
Expand Down
4 changes: 2 additions & 2 deletions 2D Poisson Equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

def plot2D(x, y, p):
fig = pyplot.figure(figsize=(11, 7), dpi=100)
ax = fig.gca(projection='3d')
ax = fig.add_subplot(projection = '3d')

#Generating 2D Mesh
X, Y = numpy.meshgrid(x, y)
Expand Down Expand Up @@ -96,7 +96,7 @@ def plot2D(x, y, p):

def plot2D(x, y, p):
fig = pyplot.figure(figsize=(11, 7), dpi=100)
ax = fig.gca(projection='3d')
ax = fig.add_subplot(projection = '3d')

X, Y = numpy.meshgrid(x, y) #Generating 2D Mesh

Expand Down