Created
September 24, 2021 13:24
-
-
Save satoru-takeuchi/f62277da75d316bc72ed74497808f51a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
fig = plt.figure() | |
ax = fig.add_subplot(1,1,1) | |
x, y = np.loadtxt("0.txt", unpack=True) | |
ax.scatter(x,y,c="red",s=1) | |
x, y = np.loadtxt("1.txt", unpack=True) | |
ax.scatter(x, y, c="blue",marker="^",s=1) | |
ax.set_title("visualize round-robin process scheduling (2 processes on 1 CPU)") | |
ax.set_xlabel("elapsed time[second]") | |
ax.set_xlim(0) | |
ax.set_ylabel("progress[%]") | |
ax.set_ylim([0,100]) | |
fig.savefig("sched.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment