I'm trying to create y axis labels in a sequence of -20 to + 20 with 5 integer increments. I've tried this below with my plot axis = ax2:
ax2.set_yticks(list(range(-20, 25, 5)))
ax2.set_yticklabels([abs(y) for y in list(range(-20, 25, 5))])
and I get a y axis ranging from 20 to 20 that looks like this figure below:
I need the y axis labels to list on the figure as: -20, -15, -10, -5, 0, 5, 10, 15, 20 and I've yet to find a solution online. Thank you for any help here!


