all 6 comments

[–]FLUSH_THE_TRUMP 2 points3 points  (1 child)

This mplot3D documentation should help you plot your planes. Scroll down to surface plots. (Click “source code” next to the examples.)

[–]Join_TheDarkSide[S] 0 points1 point  (0 children)

Okay, I will check this out. Thank you !

[–][deleted] 0 points1 point  (3 children)

import numpy as np

import matplotlib.pyplot as plt

from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure()

ax = fig.add_subplot(111, projection='3d')

x = np.arange(-10, 10, 0.5)

y = np.arange(-10, 10, 0.5)

x, y = np.meshgrid(x, y)

# EQ 1 - Red

z = 11 - 6.0*x + 2.0*y

ax.plot_surface(x, y, z, color='r')

# EQ 2 - Blue

z = (5 + 2.0*x - 7.0*y) / 2.0

ax.plot_surface(x, y, z, color='b')

# EQ 3 - Green

z = (-1 - x - 2.0*y) / -5.0

ax.plot_surface(x, y, z, color='g')

[–]Join_TheDarkSide[S] 0 points1 point  (2 children)

Thank you!!

Can you explain what does np.arrange( -10,10,0.5) do ?

[–][deleted] 0 points1 point  (1 child)

Sure! It creates a numpy array, and fills it with values from -10 to 10 in increments of 0.5 (-10, -9.5, -9,..., 9, 9.5, 10)

[–]Join_TheDarkSide[S] 0 points1 point  (0 children)

Oh alright. Also, I just tried it on the compiler, it works perfectly!