I'm looking to create a program that will randomly generate lines (that are inequalities) and that will show the area that satisfies the constraints.
I don't mind which libraries are used so feel free to use sympy, numpy etc
I will show my current code but this just fills the area between 2 lines and doesn't use inequalities at all.
If possible a legend would be nice but I can always add one myself.
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0,100,0.1)
y1 = 2*x
y2 = 0.5*x+5
plt.ylim(0, 20)
plt.xlim(0, 20)
# Plotting of lines
plt.plot(x, y1,
x, y2)
# Filling between line y3 and line y4
plt.fill_between(x, y1, y2, color='grey', alpha=0.5)
plt.show()