plot a graph of a list of tuples

I am currently busy with a project where I need to make a graph out of a list of tuples. Right now the data is like this:

[(1, 109.55, 63.375), (1, 109.55, 86.5), (1, 114.404, 87.493), (1, 123.711, 65.692), (1, 126.32, 65.692), (1, 135.627, 87.493), (1, 140.481, 86.5), (1, 140.481, 57.985), (1, 144.277, 57.985), (1, 144.277, 92.015), (1, 136.126, 92.015), (1, 124.975, 65.995), (1, 113.9, 92.015), (1, 105.723, 92.015), (1, 105.723, 57.985), (1, 109.55, 57.985), (1, 109.55, 63.225), (1, 110.842, 63.225), (1, 110.842, 85.445), (1, 113.629, 86.015), (1, 122.857, 64.399), (1, 127.174, 64.399), (1, 136.402, 86.015), (1, 139.189, 85.445), (1, 139.189, 56.693), (1, 145.569, 56.693), (1, 145.569, 93.307), (1, 135.274, 93.307), (1, 124.979, 69.286), (1, 114.754, 93.307), (1, 104.431, 93.307), (1, 104.431, 56.693), (1, 110.842, 56.693), (1, 110.842, 63.075), (1, 111.985, 63.075), (1, 111.985, 84.512), (1, 112.944, 84.709), (1, 122.103, 63.257), (1, 127.928, 63.257), (1, 137.087, 84.709), (1, 138.046, 84.512), (1, 138.046, 55.55), (1, 146.712, 55.55), (1, 146.712, 94.45), (1, 134.52, 94.45), (1, 124.983, 72.196), (1, 115.51, 94.45), (1, 103.288, 94.45), (1, 103.288, 55.55), (1, 111.985, 55.55), (1, 111.985, 62.925), (1, 111.295, 63.799), (1, 111.985, 63.885), (2, 107.153, 59.141), (2, 106.879, 59.415), (2, 106.879, 61.289), (2, 108.394, 59.774), (2, 108.394, 61.647), (2, 106.879, 63.163), (2, 106.879, 65.036), (2, 108.394, 63.521), (2, 108.394, 65.395), (2, 106.879, 66.91), (2, 106.879, 68.784), (2, 108.394, 67.268), (2, 108.394, 69.142), (2, 106.879, 70.657), (2, 106.879, 72.531), (2, 108.394, 71.016), (2, 108.394, 72.889), (2, 106.879, 74.404), (2, 106.879, 76.278), (2, 108.394, 74.763), (2, 108.394, 76.636), (2, 106.879, 78.152), (2, 106.879, 80.025), (2, 108.394, 78.51), (2, 108.394, 80.384), (2, 106.879, 81.899), (2, 106.879, 83.773), (2, 108.394, 82.257), (2, 108.394, 84.131), (2, 106.879, 85.646), (2, 106.879, 87.52), (2, 108.394, 86.005), (2, 108.394, 87.418), (2, 108.776, 87.496), (2, 106.879, 89.393), (2, 106.879, 90.859), (2, 107.287, 90.859), (2, 110.332, 87.814), (2, 111.887, 88.132), (2, 109.161, 90.859), (2, 111.034, 90.859), (2, 113.443, 88.451), (2, 114.039, 88.573), (2, 113.182, 90.585), (2, 112.908, 90.859), (2, 113.182, 90.585), (2, 113.406, 90.058), (3, 137.084, 90.859), (3, 140.169, 87.774), (3, 137.754, 88.268), (3, 136.338, 89.685), (3, 135.98, 88.849), (3, 137.48, 88.542), (3, 136.54, 88.735), (4, 142.847, 90.859), (4, 143.121, 90.585), (4, 143.121, 88.664), (4, 140.926, 90.859), (4, 139.005, 90.859), (4, 143.121, 86.743), (4, 143.121, 84.822), (4, 141.637, 86.306), (4, 141.637, 84.386), (4, 143.121, 82.902), (4, 143.121, 80.981), (4, 141.637, 82.465), (4, 141.637, 80.544), (4, 143.121, 79.06), (4, 143.121, 77.139), (4, 141.637, 78.623), (4, 141.637, 76.702), (4, 143.121, 75.218), (4, 143.121, 73.298), (4, 141.637, 74.782), (4, 141.637, 72.861), (4, 143.121, 71.377), (4, 143.121, 69.456), (4, 141.637, 70.94), (4, 141.637, 69.019), (4, 143.121, 67.535), (4, 143.121, 65.614), (4, 141.637, 67.098), (4, 141.637, 65.178), (4, 143.121, 63.694), (4, 143.121, 61.773), (4, 141.637, 63.257), (4, 141.637, 61.336), (4, 143.121, 59.852), (4, 143.121, 59.141), (4, 141.911, 59.141), (4, 141.637, 59.415), (4, 141.911, 59.141), (4, 142.484, 59.141), (5, 113.951, 91.948), (5, 113.914, 92.036), (5, 105.702, 92.036), (5, 105.702, 57.964), (5, 109.571, 57.964), (5, 109.571, 86.483), (5, 114.391, 87.468), (5, 123.697, 65.671), (5, 126.334, 65.671), (5, 135.64, 87.468), (5, 140.46, 86.483), (5, 140.46, 57.964), (5, 144.298, 57.964), (5, 144.298, 92.036), (5, 136.112, 92.036), (5, 124.975, 66.05), (5, 114.01, 91.81), (5, 115.19, 92.313), (5, 114.762, 93.318), (5, 104.42, 93.318), (5, 104.42, 56.682), (5, 110.853, 56.682), (5, 110.853, 85.436), (5, 113.623, 86.003), (5, 122.85, 64.389), (5, 127.181, 64.389), (5, 136.408, 86.003), (5, 139.178, 85.436), (5, 139.178, 56.682), (5, 145.58, 56.682), (5, 145.58, 93.318), (5, 135.267, 93.318), (5, 124.979, 69.314), (5, 115.248, 92.175), (5, 116.29, 92.618), (5, 115.51, 94.45), (5, 103.288, 94.45), (5, 103.288, 55.55), (5, 111.985, 55.55), (5, 111.985, 84.512), (5, 112.944, 84.709), (5, 122.103, 63.257), (5, 127.928, 63.257), (5, 137.087, 84.709), (5, 138.046, 84.512), (5, 138.046, 55.55), (5, 146.712, 55.55), (5, 146.712, 94.45), (5, 134.52, 94.45), (5, 124.983, 72.196), (5, 116.349, 92.48), (5, 115.335, 92.321), (5, 115.973, 93.363), (6, 113.563, 90.042), (6, 111.625, 88.103), (6, 109.333, 87.634), (6, 110.273, 87.827), (7, 106.848, 90.618), (7, 107.12, 90.89), (7, 108.943, 90.89), (7, 106.848, 88.795), (7, 106.848, 86.972), (7, 110.766, 90.89), (7, 112.589, 90.89), (7, 109.605, 87.906), (7, 108.425, 87.665), (7, 108.425, 86.726), (7, 106.848, 85.149), (7, 106.848, 83.326), (7, 108.425, 84.904), (7, 108.425, 83.081), (7, 106.848, 81.503), (7, 106.848, 79.68), (7, 108.425, 81.258), (7, 108.425, 79.435), (7, 106.848, 77.857), (7, 106.848, 76.034), (7, 108.425, 77.612), (7, 108.425, 75.789), (7, 106.848, 74.211), (7, 106.848, 72.388), (7, 108.425, 73.966), (7, 108.425, 72.143), (7, 106.848, 70.565), (7, 106.848, 68.742), (7, 108.425, 70.32), (7, 108.425, 68.497), (7, 106.848, 66.919), (7, 106.848, 65.096), (7, 108.425, 66.674), (7, 108.425, 64.851), (7, 106.848, 63.274), (7, 106.848, 61.451), (7, 108.425, 63.028), (7, 108.425, 61.205), (7, 106.848, 59.628), (7, 106.848, 59.11), (7, 108.153, 59.11), (7, 108.425, 59.382), (7, 108.153, 59.11), (7, 107.578, 59.11), (8, 143.152, 59.382), (8, 142.88, 59.11), (8, 141.606, 59.11), (8, 141.606, 59.714), (8, 143.152, 61.26), (8, 143.152, 63.139), (8, 141.606, 61.593), (8, 141.606, 63.471), (8, 143.152, 65.017), (8, 143.152, 66.895), (8, 141.606, 65.349), (8, 141.606, 67.228), (8, 143.152, 68.774), (8, 143.152, 70.652), (8, 141.606, 69.106), (8, 141.606, 70.984), (8, 143.152, 72.53), (8, 143.152, 74.409), (8, 141.606, 72.863), (8, 141.606, 74.741), (8, 143.152, 76.287), (8, 143.152, 78.165), (8, 141.606, 76.619), (8, 141.606, 78.498), (8, 143.152, 80.044), (8, 143.152, 81.922), (8, 141.606, 80.376), (8, 141.606, 82.254), (8, 143.152, 83.8), (8, 143.152, 85.679), (8, 141.606, 84.133), (8, 141.606, 86.011), (8, 143.152, 87.557), (8, 143.152, 89.436), (8, 141.194, 87.477), (8, 139.634, 87.796), (8, 142.728, 90.89), (8, 140.85, 90.89), (8, 138.075, 88.115), (8, 136.516, 88.434), (8, 138.972, 90.89), (8, 137.093, 90.89), (8, 136.821, 90.618), (8, 137.093, 90.89), (8, 137.668, 90.89)]

Within one tuple it is: a segment number, x coordinate, y coordinate. All the coordinates need to be plotted without a line between the different segments. I tried doing it with matplot but that is not working.

Leave a Comment