-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvisualizePartitions.py
44 lines (33 loc) · 1.15 KB
/
visualizePartitions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 25 08:00:37 2019
File to visualize partition
DOESNOT WORK YET....
@author: vpandey
"""
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
import pandas as pd
def plotCluster(netName):
import os
cwd = os.getcwd()
dataDir = cwd+'/Networks/'+netName+'/'+netName+"_node.txt"
InputData = pd.read_csv(dataDir, sep='\t', index_col=None)
# plt.scatter(InputData['X'],InputData['Y'])
# print(InputData.)
plt.figure(figsize=(8, 8))
m = Basemap(projection='ortho', resolution=None, lat_0=50, lon_0=-100)
m.bluemarble(scale=0.5)
plt.plot(InputData["X"], InputData["Y"], 'ok', markersize=5)
plt.show()
return InputData
if __name__=='__main__':
data= plotCluster('Austin_sdb')
# import argparse
# parser = argparse.ArgumentParser()
# parser.add_argument('--net_name', type=str, default='vpg') #I assume this is the name of the folder with inputs
# parser.add_argument('--subfolder_name','-sfn', type=str)
# args = parser.parse_args()
# customPlotFunc(args.net_name,args.subfolder_name)