-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.py
More file actions
26 lines (19 loc) · 669 Bytes
/
Copy pathplot.py
File metadata and controls
26 lines (19 loc) · 669 Bytes
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
import sys
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#color_dict = {'stable' : 'green', 'unstable' : 'red',
# 'double_minus_one' : 'blue', 'double_plus_one' : 'black'}
color_dict = {'stable' : 'white', 'unstable' : 'grey',
'double_minus_one' : 'blue', 'double_plus_one' : 'black'}
filename = sys.argv[1]
if (os.path.exists(filename)):
df = pd.read_table(filename, delimiter=r"\s+")
fig, ax = plt.subplots(nrows=1, ncols=1)
colors = [color_dict[stab_stat] for stab_stat in df['stability_status']]
ax.scatter(df['beta'], df['h'], c=colors, s=6, marker='s')
ax.grid(True)
plt.show()
else:
print("File not found")