I plot the MST but not all branches are connected especially for the case where one object is inside the other:
from __future__ import print_function
import numpy as np
import matplotlib.pylab as plt
import mistree as mist
y = np.array( [168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 170, 170, 170, 170, 171, 171, 171, 171, 172, 172, 172, 172, 173, 173, 173, 173, 174, 174, 175, 175, 175, 175, 176, 176, 177, 177, 178, 178, 179, 179, 180, 180, 181, 181, 182, 182, 182, 183, 183, 183, 184, 184, 184, 185, 185, 185, 186, 186, 186, 187, 187, 188, 188, 189, 189, 189, 189, 189, 190, 190, 190, 191, 191, 191, 192, 192, 192, 193, 193, 193, 194, 194, 195, 195, 195, 196, 196, 196, 196, 196, 197, 197, 197, 198, 198, 198, 199, 199, 199, 200, 200, 200, 201, 201, 202, 202, 202, 203, 203, 204, 204, 204, 204, 205, 205, 205, 206, 206, 206, 207, 207, 207, 208, 208, 208, 209, 209, 210, 210, 210, 211, 211, 212, 212, 213, 213, 214, 214, 215, 215, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 218, 218, 218, 218, 218, 218, 218, 219, 219, 219, 219, 219, 219, 220, 220, 220, 220, 220, 220, 220, 221, 221, 221, 221, 221, 221, 222, 222, 222, 222, 223, 223, 223, 223, 223, 223, 224, 224, 224, 224, 225, 225, 225, 225, 226, 226, 226, 226, 227, 227, 227, 227, 227, 228, 228, 228, 228, 228, 229, 229, 229, 229, 229, 230, 230, 230, 230, 231, 231, 231, 231, 231, 232, 232, 232, 232, 233, 233, 233, 233, 234, 234, 234, 234, 235, 235, 235, 235, 235, 236, 236, 236, 236, 236, 237, 237, 237, 237, 237, 238, 238, 238, 238, 239, 239, 239, 239, 239, 240, 240, 240, 240, 241, 241, 241, 241, 242, 242, 242, 242, 242, 243, 243, 243, 243, 243, 243, 243, 243, 243, 244, 244, 244, 244, 244, 244, 245, 245, 245, 245, 245, 245, 246, 246, 246, 246, 246, 246, 246, 246, 246, 247, 247, 247, 247, 247, 247, 248, 248, 248, 248, 248, 249, 249, 249, 249, 249, 249, 250, 250, 250, 250, 250, 251, 251, 251, 251, 251, 252, 252, 252, 252, 252, 252, 253, 253, 253, 253, 253, 254, 254, 254, 254, 254, 255, 255, 255, 255, 255, 256, 256, 256, 256, 257, 257, 257, 257, 257, 257, 258, 258, 258, 258, 258, 259, 259, 259, 259, 259, 260, 260, 260, 260, 260, 261, 261, 261, 261, 261, 262, 262, 262, 262, 262, 263, 263, 263, 263, 263, 264, 264, 264, 264, 264, 265, 265, 265, 265, 266, 266, 266, 266, 267, 267, 267, 267, 268, 268, 268, 268, 269, 269, 269, 269, 270, 270, 270, 270, 271, 271, 271, 271, 271, 272, 272, 272, 272, 272, 273, 273, 273, 273, 273, 274, 274, 274, 274, 275, 275, 275, 275, 275, 276, 276, 276, 276, 277, 277, 277, 277, 278, 278, 278, 278, 279, 279, 279, 279, 280, 280, 280, 280, 281, 281, 281, 281, 282, 282, 282, 282, 282, 283, 283, 283, 283, 283, 284, 284, 284, 284, 284, 285, 285, 285, 285, 286, 286, 286, 286, 286, 287, 287, 287, 287, 288, 288, 288, 288, 289, 289, 289, 289, 290, 290, 290, 290, 291, 291, 291, 291, 292, 292, 292, 292, 293, 293, 293, 293, 294, 294, 294, 294, 295, 295, 295, 295, 295, 296, 296, 296, 296, 297, 297, 297, 297, 297, 298, 298, 298, 298, 299, 299, 299, 299, 300, 300, 300, 300, 301, 301, 301, 301, 302, 302, 302, 302, 303, 303, 303, 303, 303, 304, 304, 304, 304, 304, 305, 305, 305, 305, 305, 306, 306, 306, 306, 307, 307, 307, 307, 307, 308, 308, 308, 308, 309, 309, 309, 309, 310, 310, 310, 310, 311, 311, 311, 311, 312, 312, 312, 312, 313, 313, 313, 313, 314, 314, 314, 314, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 317, 317, 317, 317, 317, 317, 317, 317, 318, 318, 318, 318, 318, 318, 318, 318, 319, 319, 319, 319, 319, 319, 319, 319, 320, 320, 320, 320, 320, 320, 320, 320, 321, 321, 321, 321, 321, 321, 322, 322, 322, 322, 322, 322, 322, 322, 323, 323, 323, 323, 323, 323, 324, 324, 324, 324, 324, 324, 325, 325, 325, 325, 325, 325, 326, 326, 326, 326, 326, 326, 327, 327, 327, 327, 327, 327, 328, 328, 328, 328, 328, 328, 328, 329, 329, 329, 329, 329, 329, 330, 330, 330, 330, 330, 330, 330, 331, 331, 331, 331, 331, 331, 331, 332, 332, 332, 332, 332, 332, 332, 333, 333, 333, 333, 333, 333, 333, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 339, 339, 339, 339, 339, 339, 339, 339, 340, 340, 340, 340, 340, 340, 340, 340, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 343, 343, 343, 343, 344, 344, 344, 344, 345, 345, 345, 345, 346, 346, 346, 346, 347, 347, 347, 347, 348, 348, 348, 348, 349, 349, 349, 349, 350, 350, 350, 350, 351, 351, 351, 351, 352, 352, 352, 352, 353, 353, 353, 353, 354, 354, 354, 354, 355, 355, 355, 355, 356, 356, 356, 356, 357, 357, 357, 357, 358, 358, 358, 358, 359, 359, 359, 359, 360, 360, 360, 360, 361, 361, 361, 361, 362, 362, 362, 362, 363, 363, 363, 363, 364, 364, 364, 364, 365, 365, 365, 365, 366, 366, 366, 366, 367, 367, 367, 367, 368, 368, 368, 368, 369, 369, 369, 369, 370, 370, 370, 370, 371, 371, 371, 371, 372, 372, 372, 372, 373, 373, 373, 373, 374, 374, 374, 374, 375, 375, 375, 375, 376, 376, 376, 376, 376, 376, 377, 377, 377, 377, 378, 378, 378, 378, 378, 378, 379, 379, 379, 379, 379, 379, 380, 380, 380, 380, 380, 380, 381, 381, 381, 381, 381, 381, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 384, 384, 385, 385, 385, 386, 386, 387, 387, 387, 388, 388, 389, 389, 390, 390, 391, 391, 392, 392, 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 395, 395, 395, 395, 395, 395, 396, 396, 396, 396, 396, 396, 397, 397, 397, 397, 397, 397, 397, 397, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 400, 400, 400, 400, 400, 400, 400, 400, 400, 401, 401, 401, 401, 401, 401, 401, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 405, 405, 405, 406, 406, 406, 407, 407, 407, 408, 408, 408, 408, 408, 408, 409, 409, 409, 409, 409, 409, 410, 410, 410, 411, 411, 411, 412, 412, 412, 413, 413, 413, 414, 414, 414, 414, 414, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 417, 417, 417, 417, 417, 417, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 419, 419, 419, 419, 420, 420, 420, 420, 420, 420, 420, 421, 421, 421, 421, 421, 421, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423] )
x = np.array( [513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 508, 509, 510, 511, 512, 524, 525, 526, 527, 528, 506, 507, 529, 530, 504, 505, 531, 532, 502, 503, 533, 534, 500, 501, 535, 536, 499, 537, 497, 498, 538, 539, 496, 540, 495, 541, 494, 542, 493, 543, 492, 544, 492, 544, 491, 545, 546, 490, 547, 548, 489, 549, 550, 487, 488, 551, 486, 552, 553, 485, 554, 484, 555, 483, 556, 557, 558, 559, 482, 560, 561, 482, 562, 563, 481, 564, 565, 480, 566, 567, 480, 568, 479, 569, 570, 479, 571, 572, 573, 574, 478, 575, 576, 478, 577, 578, 477, 579, 580, 477, 581, 582, 476, 583, 476, 584, 585, 476, 586, 476, 587, 588, 589, 476, 590, 591, 475, 592, 593, 475, 594, 595, 475, 596, 597, 475, 598, 474, 599, 600, 474, 601, 473, 602, 473, 603, 472, 604, 472, 605, 471, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 606, 607, 471, 514, 515, 516, 517, 518, 530, 531, 532, 533, 534, 608, 609, 471, 512, 513, 535, 536, 610, 611, 471, 510, 511, 537, 538, 612, 471, 508, 509, 539, 540, 613, 614, 470, 506, 507, 541, 542, 615, 470, 505, 543, 616, 470, 503, 504, 544, 545, 617, 469, 502, 546, 618, 469, 501, 547, 619, 468, 500, 548, 620, 468, 499, 549, 621, 622, 467, 498, 550, 623, 624, 467, 497, 551, 625, 626, 466, 497, 551, 627, 466, 496, 552, 628, 629, 465, 495, 553, 630, 465, 495, 553, 631, 465, 494, 554, 632, 465, 494, 554, 633, 634, 464, 493, 555, 635, 636, 464, 493, 555, 637, 638, 463, 492, 556, 639, 462, 492, 556, 640, 641, 462, 491, 557, 642, 461, 491, 557, 643, 461, 491, 557, 644, 645, 460, 491, 558, 559, 560, 561, 562, 646, 647, 460, 491, 563, 564, 648, 649, 459, 490, 565, 566, 650, 651, 459, 490, 567, 568, 652, 653, 654, 655, 656, 458, 490, 569, 570, 657, 658, 458, 490, 571, 659, 660, 458, 490, 572, 573, 661, 662, 458, 490, 574, 663, 664, 458, 490, 575, 576, 665, 457, 490, 577, 578, 666, 667, 457, 490, 579, 580, 668, 456, 490, 581, 582, 669, 455, 490, 583, 584, 670, 455, 491, 585, 671, 454, 491, 586, 587, 672, 673, 454, 491, 588, 674, 675, 453, 491, 589, 676, 677, 453, 491, 590, 678, 679, 452, 492, 591, 680, 681, 452, 492, 592, 593, 682, 451, 493, 594, 683, 684, 451, 493, 595, 596, 685, 451, 494, 597, 686, 451, 494, 598, 687, 451, 495, 599, 688, 450, 495, 600, 689, 450, 496, 601, 689, 450, 496, 602, 690, 449, 496, 602, 691, 692, 449, 495, 603, 693, 694, 448, 495, 604, 695, 696, 448, 494, 604, 697, 447, 494, 605, 698, 699, 447, 494, 605, 700, 446, 494, 606, 701, 446, 494, 606, 702, 445, 493, 607, 703, 445, 493, 607, 704, 445, 493, 608, 704, 445, 493, 608, 705, 706, 445, 493, 608, 707, 708, 444, 493, 608, 709, 710, 444, 493, 608, 711, 444, 493, 609, 712, 713, 444, 493, 609, 714, 444, 492, 609, 715, 444, 492, 609, 716, 444, 491, 609, 717, 444, 491, 610, 718, 444, 491, 610, 718, 444, 491, 610, 719, 444, 491, 610, 720, 444, 490, 610, 721, 722, 443, 490, 611, 723, 443, 490, 611, 724, 725, 443, 490, 611, 726, 443, 490, 611, 727, 443, 490, 611, 728, 442, 490, 611, 729, 442, 490, 611, 730, 442, 490, 611, 731, 732, 442, 490, 611, 733, 734, 442, 490, 611, 735, 736, 442, 491, 611, 737, 442, 491, 610, 738, 739, 442, 491, 610, 740, 442, 491, 610, 741, 442, 491, 610, 742, 442, 492, 610, 743, 441, 492, 609, 744, 441, 493, 609, 744, 441, 493, 608, 745, 441, 494, 608, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 746, 441, 494, 607, 654, 655, 656, 657, 658, 670, 671, 672, 673, 674, 747, 748, 440, 495, 607, 652, 653, 675, 676, 749, 440, 495, 606, 650, 651, 677, 678, 750, 440, 496, 606, 648, 649, 679, 680, 751, 440, 497, 605, 646, 647, 681, 682, 752, 440, 497, 604, 645, 683, 753, 440, 498, 604, 643, 644, 684, 685, 753, 440, 499, 603, 642, 686, 754, 440, 500, 602, 641, 687, 755, 440, 501, 601, 640, 688, 755, 440, 502, 600, 639, 689, 756, 440, 503, 599, 638, 690, 756, 440, 504, 597, 598, 637, 691, 757, 439, 504, 596, 637, 691, 757, 439, 505, 594, 595, 636, 692, 758, 439, 506, 592, 593, 635, 693, 758, 439, 507, 590, 591, 635, 693, 759, 439, 508, 588, 589, 634, 694, 759, 438, 509, 571, 583, 584, 585, 586, 587, 634, 694, 759, 438, 510, 511, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 633, 695, 759, 438, 512, 559, 560, 561, 562, 563, 564, 565, 633, 695, 759, 438, 513, 514, 554, 555, 556, 557, 558, 632, 696, 760, 438, 515, 516, 546, 547, 548, 549, 550, 551, 552, 553, 632, 696, 760, 438, 517, 518, 544, 545, 631, 697, 760, 438, 519, 520, 542, 543, 631, 697, 760, 438, 521, 522, 523, 524, 525, 537, 538, 539, 540, 541, 631, 697, 760, 438, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 631, 697, 760, 438, 631, 697, 760, 438, 630, 698, 760, 438, 630, 698, 761, 437, 630, 698, 761, 437, 630, 698, 762, 437, 630, 698, 762, 437, 630, 698, 763, 437, 630, 698, 763, 436, 630, 698, 763, 436, 630, 698, 763, 436, 630, 698, 763, 436, 630, 698, 764, 436, 631, 697, 764, 436, 631, 697, 764, 436, 631, 697, 764, 436, 631, 697, 764, 436, 631, 697, 764, 436, 632, 696, 764, 436, 632, 696, 764, 437, 633, 695, 764, 437, 633, 695, 764, 437, 634, 694, 764, 437, 634, 694, 763, 437, 635, 693, 763, 437, 635, 693, 763, 436, 636, 692, 763, 436, 637, 691, 763, 436, 637, 691, 762, 436, 638, 690, 762, 436, 639, 689, 761, 436, 640, 688, 761, 436, 641, 687, 760, 436, 642, 686, 760, 436, 643, 644, 684, 685, 759, 436, 645, 683, 759, 436, 646, 647, 681, 682, 758, 437, 648, 649, 679, 680, 757, 437, 650, 651, 677, 678, 757, 437, 652, 653, 675, 676, 756, 437, 654, 655, 656, 657, 658, 670, 671, 672, 673, 674, 755, 437, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 754, 437, 753, 436, 751, 752, 436, 750, 436, 748, 749, 436, 747, 436, 747, 436, 746, 436, 745, 436, 745, 436, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 744, 436, 639, 640, 641, 642, 643, 655, 656, 657, 658, 659, 743, 436, 637, 638, 660, 661, 742, 437, 635, 636, 662, 663, 741, 437, 633, 634, 664, 665, 688, 739, 740, 437, 629, 630, 631, 632, 666, 667, 683, 684, 685, 686, 687, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 738, 437, 624, 625, 626, 627, 628, 668, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 701, 702, 736, 737, 437, 622, 623, 669, 670, 703, 704, 734, 735, 438, 620, 621, 705, 706, 732, 733, 438, 612, 613, 614, 615, 616, 617, 618, 619, 707, 708, 730, 731, 439, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 607, 608, 609, 610, 611, 709, 710, 711, 712, 713, 725, 726, 727, 728, 729, 439, 590, 591, 592, 593, 594, 606, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 440, 588, 589, 440, 586, 587, 441, 584, 585, 441, 579, 580, 581, 582, 583, 442, 574, 575, 576, 577, 578, 443, 572, 573, 443, 570, 571, 444, 568, 569, 445, 566, 567, 446, 562, 563, 564, 565, 447, 516, 517, 518, 519, 520, 521, 533, 534, 535, 536, 537, 538, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 448, 449, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 450, 499, 500, 501, 502, 503, 451, 452, 491, 492, 493, 494, 495, 496, 497, 498, 453, 454, 489, 490, 455, 456, 484, 485, 486, 487, 488, 457, 458, 480, 481, 482, 483, 459, 460, 461, 462, 463, 475, 476, 477, 478, 479, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474] )
mst = mist.GetMST(x=x, y=y)
d, l, b, s, l_index, b_index = mst.get_stats(include_index=True)
plt.figure(figsize=(15, 15))
# plotting nodes:
plt.scatter(x, y, s=10, color='r')
# plotting MST edges:
plt.plot([x[l_index[0]], x[l_index[1]]],
[y[l_index[0]], y[l_index[1]]],
color='k')
plt.xlim(400, 900)
plt.ylim(100, 500)
plt.xlabel(r'$X$', size=16)
plt.ylabel(r'$Y$', size=16)
plt.tight_layout()
plt.show()