I need to make 100 views with matplotlib in python. The Start point is always random. I know how to generate 100 plots but I want to use the "Forward to next view" arrows.
Here is my code:
import matplotlib.pyplot as plt
for i in range (1,3):
Startx = [randrange(1, 19)] # x axis values
Starty = [randrange(1, 8)] # y axis values
plt.plot(Startx, Starty, color='black', linestyle='solid', linewidth=3, # plotting the points
marker='o', markerfacecolor='green', markersize=8)
##########################################################################################################
Endx = [16.5]
Endy = [7.5]
plt.plot(Endx, Endy, color='black', linestyle='solid', linewidth=3,
marker='o', markerfacecolor='red', markersize=8)
##########################################################################################################
Ax = [5, 2.5, 3, 5, 6, 5]
Ay = [7.5, 6, 3.5, 3, 5.5, 7.5]
plt.plot(Ax, Ay, color='black', linestyle='solid', linewidth=3,
marker='o', markerfacecolor='blue', markersize=8)
##########################################################################################################
Bx = [8, 6.5, 7.25, 8]
By = [3, 3, 5.5, 3]
plt.plot(Bx, By, color='black', linestyle='solid', linewidth=3,
marker='o', markerfacecolor='blue', markersize=8)
plt.xlim(0, 19)
plt.ylim(0, 8) # setting x and y axis range
plt.xlabel('x - axis') # naming the x axis
plt.ylabel('y - axis') # naming the y axis
plt.show() # function to show the plot