Merge pull request #10 from bradybod/SquareSimulation
added to python script
This commit is contained in:
@@ -22,13 +22,20 @@ if __name__ == "__main__":
|
|||||||
hccx = []
|
hccx = []
|
||||||
hccy = []
|
hccy = []
|
||||||
|
|
||||||
|
mx = []
|
||||||
|
my = []
|
||||||
|
|
||||||
with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquareCoveredCells.txt") as c:
|
with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquareCoveredCells.txt") as c:
|
||||||
for line in c:
|
for line in c:
|
||||||
x, y = line.split()
|
x, y = line.split()
|
||||||
sccx.append(int(x))
|
sccx.append(int(x))
|
||||||
sccy.append(int(y))
|
sccy.append(int(y))
|
||||||
|
|
||||||
|
with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/Mines.txt") as c:
|
||||||
|
for line in c:
|
||||||
|
x, y = line.split()
|
||||||
|
mx.append(int(x))
|
||||||
|
my.append(int(y))
|
||||||
|
|
||||||
with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquareDetectedMines.txt") as c:
|
with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquareDetectedMines.txt") as c:
|
||||||
for line in c:
|
for line in c:
|
||||||
@@ -104,4 +111,12 @@ if __name__ == "__main__":
|
|||||||
plt.legend(loc='lower left', fontsize='xx-small')
|
plt.legend(loc='lower left', fontsize='xx-small')
|
||||||
matplotlib.pyplot.savefig('/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquareCoverage.png')
|
matplotlib.pyplot.savefig('/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquareCoverage.png')
|
||||||
plt.plot()
|
plt.plot()
|
||||||
|
plt.close(fig)
|
||||||
|
|
||||||
|
fig = plt.figure(5)
|
||||||
|
plt.plot(mx, my, 'o', label='mines', color='red', linestyle='None')
|
||||||
|
plt.title('Mine Map')
|
||||||
|
plt.legend(loc='lower left', fontsize='xx-small')
|
||||||
|
matplotlib.pyplot.savefig('/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/Mines.png')
|
||||||
|
plt.plot()
|
||||||
plt.close(fig)
|
plt.close(fig)
|
||||||
Reference in New Issue
Block a user