import matplotlib.pyplot as plt
import json

# image_name = "C:/Users/Danny/Downloads/__output/neutral/Cutout-Man-in-Suit2.png"

# # im = plt.imread(image_name)
# # implot = plt.imshow(im)


# data2 = [714.822814941406,
# 134.164581298828,
# 718.623962402344,
# 283.058197021484,
# 565.859985351563,
# 267.838714599609,
# 512.309936523438,
# 497.020599365234,
# 523.804016113281,
# 680.315979003906,
# 871.239135742188,
# 290.690124511719,
# 897.978515625,
# 504.781860351563,
# 886.606872558594,
# 684.232971191406,
# 604.061157226563,
# 710.979187011719,
# 581.115417480469,
# 1028.01599121094,
# 565.678100585938,
# 1341.2255859375,
# 787.339538574219,
# 718.659606933594,
# 768.232849121094,
# 1043.23876953125,
# 756.744323730469,
# 1325.80493164063,
# 688.164916992188,
# 107.276329040527,
# 745.250793457031,
# 107.328651428223,
# 661.221801757813,
# 115.041130065918,
# 783.611877441406,
# 111.41162109375]

# # Data for X and Y coordinates
# data1 = [0.0226364135742188,
# -0.808062076568604,
# 0.0280743837356567,
# -0.595052599906921,
# -0.19047212600708,
# -0.616825819015503,
# -0.267081618309021,
# -0.288954794406891,
# -0.250638008117676,
# -0.0267296433448792,
# 0.246407985687256,
# -0.58413428068161,
# 0.284661769866943,
# -0.277851402759552,
# 0.268393278121948,
# -0.0211259126663208,
# -0.135820925235748,
# 0.0171376466751099,
# -0.168647468090057,
# 0.47069525718689,
# -0.190732300281525,
# 0.918777704238892,
# 0.12637996673584,
# 0.0281254053115845,
# 0.0990456342697144,
# 0.492473244667053,
# 0.0826098918914795,
# 0.896716713905334,
# -0.0155007839202881,
# -0.846528887748718,
# 0.0661671161651611,
# -0.84645402431488,
# -0.0540460348129272,
# -0.835420429706573,
# 0.121047019958496,
# -0.840612828731537]

dataArray = json.load(open('file.json'))

for i in range(0, len(dataArray) - 1):
    data = dataArray[i];
    # print(data['pose'])
    # print("\n");

data1 = dataArray[20]['pose']

datax = []
datay = []

for idx, val in enumerate(data1):
    if idx % 2 == 0:
        datax.append(val)
    else:
        datay.append(val)

print(datax)
print(datay)

# # put a red dot, size 40, at 2 locations:
# #plt.scatter(x=data_x1, y=data_y1, c='r', s=40)

plt.scatter(x=datax, y=datay, c='g', s=40)
plt.gca().invert_yaxis()
plt.xlim(-1,1)
plt.autoscale(False)


plt.show()

a2ed25637e6720fda0889f659cd25b8d6fddb90d
<mask token>

<mask token>
for i in range(0, len(dataArray) - 1):
    data = dataArray[i]
<mask token>
for idx, val in enumerate(data1):
    if idx % 2 == 0:
        datax.append(val)
    else:
        datay.append(val)
print(datax)
print(datay)
plt.scatter(x=datax, y=datay, c='g', s=40)
plt.gca().invert_yaxis()
plt.xlim(-1, 1)
plt.autoscale(False)
plt.show()

<mask token>
dataArray = json.load(open('file.json'))
for i in range(0, len(dataArray) - 1):
    data = dataArray[i]
data1 = dataArray[20]['pose']
datax = []
datay = []
for idx, val in enumerate(data1):
    if idx % 2 == 0:
        datax.append(val)
    else:
        datay.append(val)
print(datax)
print(datay)
plt.scatter(x=datax, y=datay, c='g', s=40)
plt.gca().invert_yaxis()
plt.xlim(-1, 1)
plt.autoscale(False)
plt.show()

import matplotlib.pyplot as plt
import json
dataArray = json.load(open('file.json'))
for i in range(0, len(dataArray) - 1):
    data = dataArray[i]
data1 = dataArray[20]['pose']
datax = []
datay = []
for idx, val in enumerate(data1):
    if idx % 2 == 0:
        datax.append(val)
    else:
        datay.append(val)
print(datax)
print(datay)
plt.scatter(x=datax, y=datay, c='g', s=40)
plt.gca().invert_yaxis()
plt.xlim(-1, 1)
plt.autoscale(False)
plt.show()

import matplotlib.pyplot as plt
import json

# image_name = "C:/Users/Danny/Downloads/__output/neutral/Cutout-Man-in-Suit2.png"

# # im = plt.imread(image_name)
# # implot = plt.imshow(im)


# data2 = [714.822814941406,
# 134.164581298828,
# 718.623962402344,
# 283.058197021484,
# 565.859985351563,
# 267.838714599609,
# 512.309936523438,
# 497.020599365234,
# 523.804016113281,
# 680.315979003906,
# 871.239135742188,
# 290.690124511719,
# 897.978515625,
# 504.781860351563,
# 886.606872558594,
# 684.232971191406,
# 604.061157226563,
# 710.979187011719,
# 581.115417480469,
# 1028.01599121094,
# 565.678100585938,
# 1341.2255859375,
# 787.339538574219,
# 718.659606933594,
# 768.232849121094,
# 1043.23876953125,
# 756.744323730469,
# 1325.80493164063,
# 688.164916992188,
# 107.276329040527,
# 745.250793457031,
# 107.328651428223,
# 661.221801757813,
# 115.041130065918,
# 783.611877441406,
# 111.41162109375]

# # Data for X and Y coordinates
# data1 = [0.0226364135742188,
# -0.808062076568604,
# 0.0280743837356567,
# -0.595052599906921,
# -0.19047212600708,
# -0.616825819015503,
# -0.267081618309021,
# -0.288954794406891,
# -0.250638008117676,
# -0.0267296433448792,
# 0.246407985687256,
# -0.58413428068161,
# 0.284661769866943,
# -0.277851402759552,
# 0.268393278121948,
# -0.0211259126663208,
# -0.135820925235748,
# 0.0171376466751099,
# -0.168647468090057,
# 0.47069525718689,
# -0.190732300281525,
# 0.918777704238892,
# 0.12637996673584,
# 0.0281254053115845,
# 0.0990456342697144,
# 0.492473244667053,
# 0.0826098918914795,
# 0.896716713905334,
# -0.0155007839202881,
# -0.846528887748718,
# 0.0661671161651611,
# -0.84645402431488,
# -0.0540460348129272,
# -0.835420429706573,
# 0.121047019958496,
# -0.840612828731537]

dataArray = json.load(open('file.json'))

for i in range(0, len(dataArray) - 1):
    data = dataArray[i];
    # print(data['pose'])
    # print("\n");

data1 = dataArray[20]['pose']

datax = []
datay = []

for idx, val in enumerate(data1):
    if idx % 2 == 0:
        datax.append(val)
    else:
        datay.append(val)

print(datax)
print(datay)

# # put a red dot, size 40, at 2 locations:
# #plt.scatter(x=data_x1, y=data_y1, c='r', s=40)

plt.scatter(x=datax, y=datay, c='g', s=40)
plt.gca().invert_yaxis()
plt.xlim(-1,1)
plt.autoscale(False)


plt.show()
