Python Forum

Full Version: graphing inequalities
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(-10, 10, 100)
y = abs(x+2)
fig = plt.figure(figsize= (10,5))
plt.plot(x,y)
plt.show()
I get the graph to print. I was wondering what happens if I changed the equal sign to an inequality sign. The equation I want to graph is 6<= abs(x+2). Pretty new to coding and looking for help on how to understand what I am doing with python.