|
3 | 3 | import math
|
4 | 4 | import numpy as np
|
5 | 5 | from scipy import stats
|
| 6 | +import seaborn as sns |
6 | 7 |
|
7 | 8 | data = pd.read_csv("data/500-4.txt", sep="\t")
|
8 | 9 |
|
|
24 | 25 | print("\n START MEAN, STDEV, CONF INT")
|
25 | 26 |
|
26 | 27 | data = pd.read_csv(f"data/500-2.txt", sep="\t")
|
27 |
| -example = data[data["SIM_TIME"] == 25] |
| 28 | +example = data[data["SIM_TIME"] == 150] |
28 | 29 | example1 = data[data["SIM_TIME"] == 500]
|
29 | 30 | ex = example[example['RHO'] == 0.1]['AVG_WAIT']
|
30 | 31 | ex2 = example1[example1['RHO'] == 0.1]['AVG_WAIT']
|
|
40 | 41 |
|
41 | 42 | fig = plt.figure(facecolor='w')
|
42 | 43 | ax = fig.add_subplot(111, facecolor='whitesmoke', axisbelow=True)
|
43 |
| -ax.hist(ex_9, bins = 100, alpha=0.5, color = 'cornflowerblue') |
44 |
| -ax.hist(ex2_9, bins = 100, alpha = 0.6, color='springgreen') |
45 |
| -ax.set_xlabel(r'$Mean waiting time / time unit$', fontsize=12) |
| 44 | +ax.hist(ex_9, bins = 100, alpha=0.8, color = 'cornflowerblue', label="Simtime=150") |
| 45 | +ax.hist(ex2_9, bins = 100, alpha = 0.5, color='springgreen', label="Simtime=500") |
| 46 | +# sns.displot(ex_9,) |
| 47 | +# sns.displot(ex2_9) |
| 48 | +ax.set_xlabel('Mean waiting time / time unit', fontsize=12) |
46 | 49 | ax.set_ylabel('Density', fontsize=12)
|
47 | 50 | ax.set_title('Distribution mean waiting time', fontsize = 14)
|
48 | 51 | ax.yaxis.set_tick_params(length=0)
|
49 | 52 | ax.xaxis.set_tick_params(length=0)
|
50 | 53 | ax.grid(b=True, which='major', c='w', lw=2, ls='-')
|
| 54 | +legend = ax.legend() |
| 55 | +legend.get_frame().set_alpha(0.5) |
51 | 56 | for spine in ('top', 'right', 'bottom', 'left'):
|
52 | 57 | ax.spines[spine].set_visible(False)
|
53 | 58 |
|
54 |
| -plt.savefig("plots/histogram-25-500.png", dpi=300) |
| 59 | +plt.savefig("plots/histogram-150-500-01.png", dpi=300) |
55 | 60 | plt.show()
|
0 commit comments