Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- import matplotlib.font_manager
- import numpy as np
- plt.rcParams.update({"font.size": 40})
- plt.rcParams.update({"font.weight": 'bold'})
- plt.rcParams.update({"font.family": 'Palatino Linotype'})
- def ts_ss_merged_cost_from_optimum():
- # plt.figure(figsize=(10, 6))
- fig, ax = plt.subplots(figsize=(8, 6))
- plt.grid(zorder=1, color='#999999', linestyle='--', alpha=0.4)
- ts_cost_from_optimum = [1.00, 1.10, 1.21, 1.33, 1.46, 1.6, 1.7]
- ts_response = [895.2426314, 773.5780168, 722.6832199, 598.5705376, 525.2256989, 500.1245, 480.32]
- ts_response_normalized = np.divide(ts_response, 900)
- ss_response = [249, 240.8825427, 219.3213886, 209.1821135, 195.189519, 183.1074663, 169.9133813, 165.0975195,
- 155.6659093]
- ss_response = np.divide(ss_response, 250)
- ss_resource = [1, 1.114945092, 1.241382164, 1.374588561, 1.494256309, 1.579441219, 1.666670498, 1.79310757,
- 2.137935949]
- hr_response = [49.8, 26.8, 17.2, 16.88, 16.96, 16.66, 16.6]
- hr_resource = [9.4, 9.8, 10.5, 11.7, 12.3, 13.4, 15.2]
- hr_resource = np.divide(hr_resource, 9.4)
- hr_response = np.divide(hr_response, 50)
- plt.plot(ts_cost_from_optimum, ts_response_normalized, color="#00bbd6", linewidth=4, marker='d', zorder=5,
- markersize=10, markeredgecolor="#00bbd6", label="Train Ticket")
- plt.plot(ss_resource, ss_response, color="#faa32b", linewidth=4, marker='s', zorder=5, markersize=10,
- markeredgecolor="#faa32b", label="Sock Shop")
- plt.plot(hr_resource, hr_response, color='#237194', linewidth=4, marker='o', zorder=5, markersize=10,
- markeredgecolor='#237194', label="Hotel Reserve")
- plt.xticks(np.arange(1.0, 2.3, 0.2))
- plt.yticks(np.arange(0.0, 1.05, 0.2))
- plt.ylim(ymax=1.05)
- # plt.xlim(xmin=0.95)
- plt.xlabel("Normalized Resource", weight='bold')
- plt.ylabel("Normalized Response", weight='bold')
- ax.yaxis.set_label_coords(-0.13, .4)
- plt.legend(loc='lower left', ncol=2, frameon=False, fontsize=30, borderaxespad=0.05, handlelength=0.8, handletextpad=0.2, columnspacing=0.6)
- plt.tight_layout(pad=0.0, h_pad=0.0, w_pad=0.0)
- plt.savefig("figures/ts_ss_dr_vs_cost_from_optimum.png", bbox_inches='tight', pad_inches=0)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement