I am creating a plot with matplotlib
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 5, 0.1);
y = np.sin(x)
plt.plot(x, y)
Can I flip the plot, making the y-axis inverted and all positive values negative and vice versa?
I know I can multiply by -1 and use invert_yaxis
but I wonder if there is a function for flipping it without changing the values.