I am using contour plot but I am facing the issue that it is plotting the points where the function is undefined. For example, I am using a rational function and it has a discontinuity in y = 1(red horizontal line.
Is there any way to avoid this?
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0,1.3,500)
y = np.linspace(0,2.5,500)
X, Y = np.meshgrid (x, y)
plt.contour(X, Y, R(X, Y), , colors=‘r’)