0

I Am making a current scientific graph on matplotlib for a worksheet. Making a S-N graph and wanting my x-axis to show 10^5, ect for the amount of 0s there is. i will put my code in and show my graph vs what i actually need. cheers

what I need enter image description here

my code here:

import matplotlib.pyplot as plt
import numpy as np

data = np.loadtxt('data.csv', delimiter =',')
#print(data)

x = []
y  = []

for i in range(len(data)):
    for j in range(2):
        if j ==0:
            y.append(data[i][j])
        else:
            x.append(data[i][j])
print(x)
print(y)

plt.ylim([0,16])

plt.yticks(range(0,16,5))

plt.plot(x, y, label = "Stainless Steel")



plt.xlabel("Number of cycles (N)")
plt.ylabel("Angle of amplitude (S)")
plt.title("S-N Graph")
plt.legend()
plt.grid(True)
plt.show()
  • Does this answer your question? [prevent scientific notation in matplotlib.pyplot](https://stackoverflow.com/questions/28371674/prevent-scientific-notation-in-matplotlib-pyplot) – Mr. T Mar 26 '22 at 03:42

0 Answers0