I’m plotting absolute value functions in matplotlib and the graph just goes around the vertex
The issue for your goal is your range that you create with linspace. The default number of samples is 50 for this method and they are evenly reparted so depending on your width, 2 might not be in this range. Use the num argument (third position) to increase this value and it will look better … Read more