-
-
Save wei2912/ac25ba3ebc0574ebad5bd36b7c2e2016 to your computer and use it in GitHub Desktop.
Making a scatter plot in python by importing data from a csv file.
This file contains 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 | |
# importing data from csv file | |
xs, ys, zs = np.loadtxt("data.txt", unpack=True, delimiter=",", dtype=float, skiprows=0) | |
# labels | |
plt.xlabel("No. of PT-CT Pairs per Distinguisher") | |
plt.ylabel("lg2(T(N))") | |
plt.title("Lower Bound on Time Complexity of Single and Double Distinguisher Attack") | |
# plotting | |
plt.plot(xs, ys, color='blue', label='Single Distinguisher Attack', linestyle='-') | |
plt.plot(xs, zs, color='rede', label='Double Distinguisher Attack', linestyle='-') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment