We can use
sympy.plot_implicit
to plot implicit functionsimport sympy from sympy import symbols, plot_implicit, Eq, And, Or x, y = symbols('x y') p0 = plot_implicit(And(Or(y > 0.75, x < 0.25), y > x), (x,0,1), (y,0,1), line_color="lightblue", show=False, aspect_ratio=(1, 1), points=1000, backend="matplotlib") p1 = plot_implicit(Eq(x**2 + (y-x)**2, (1-y)**2), (x,0,1), (y,0,1), line_color="red", show=False, aspect_ratio=(1, 1), points=1000, backend="matplotlib") p2 = plot_implicit(Eq(x**2 + (1-y)**2, (y-x)**2), (x,0,1), (y,0,1), line_color="green", show=False, aspect_ratio=(1, 1), points=1000, backend="matplotlib") p3 = plot_implicit(Eq((y-x)**2 + (1-y)**2, x**2), (x,0,1), (y,0,1), line_color="blue", show=False, aspect_ratio=(1, 1), points=1000, backend="matplotlib") p0.extend(p1) p0.extend(p2) p0.extend(p3) p0.show()