Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
graphing inequalities
#1
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Forcing matplotlib to NOT use scientific notation when graphing sawtooth500 4 349 Mar-25-2024, 03:00 AM
Last Post: sawtooth500
  system of inequalities in python fiel 1 1,988 Sep-12-2020, 06:07 AM
Last Post: DPaul
  Help Graphing Arduino Data Real Time in Python nschulz 0 2,532 Mar-12-2020, 06:15 PM
Last Post: nschulz
  Matplotlib graphing help (dual y axis, groupby, filter) keml 0 2,194 Feb-07-2020, 02:35 AM
Last Post: keml
  Graphing from a while loop McDweevo 1 2,873 Nov-13-2019, 08:02 PM
Last Post: micseydel
  Graphing three database in one graph Python r_e 1 2,369 Jun-20-2019, 05:10 PM
Last Post: r_e
  graphing euler method rondo 1 2,491 May-03-2019, 01:03 AM
Last Post: scidam
  Graphing process execution time Temennigru 4 4,771 Nov-15-2017, 11:54 PM
Last Post: Temennigru

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020