Initial commit

This commit is contained in:
2025-11-25 23:05:11 -05:00
commit ca8a84a9ad
40 changed files with 33850 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
3 395
3.3 390
3.9 387
4.05 384
4.5 380
4.64 377
5.4 368
5.88 358
6.07 349
7.4 355
8.1 400
8.95 466
9.5 539

View File

@@ -0,0 +1,216 @@
import numpy as np
import matplotlib.pyplot as plt
import random
import ast
# Getting Random Data for Examples
random.seed(10)
x = np.linspace(1,20,50)
y1 = np.sin(x)
y2 = np.e**(-0.5*x)
num= np.random.random
def make_basic_single_plot(x:list, y:list, xlabel:str = 'X-Axis', ylabel:str ='Y-Axis', title:str = '', lcolor = ['black'],lstyle: list = ['solid']):
plt.rcParams.update({
'font.family': 'Courier New', # monospace font
'font.size': 20,
'axes.titlesize': 20,
'axes.labelsize': 20,
'xtick.labelsize': 20,
'ytick.labelsize': 20,
'legend.fontsize': 20,
'figure.titlesize': 20,
'figure.figsize': [10,10]
})
fig, ax = plt.subplots()
ax.set_xlabel(xlabel)
ax.set_ylabel(ylabel)
ax.set_title(title)
if type(y)==np.ndarray:
ax.plot(x,y, color=lcolor[0], linestyle=lstyle[0])
if type(y[0])==np.ndarray:
for i in range(len(y)):
ax.plot(x,y[i], color=lcolor[i], linestyle=lstyle[i])
#ax[i].set_color(lcolor[i])
#ax[i.set_linestyle(lstyle[i])]
plt.show()
print("Done")
def make_basic_single_plot_int(x,y):
#Set Base Styling
plt.rcParams.update({
'font.family': 'Courier New', # monospace font
'font.size': 20,
'axes.titlesize': 20,
'axes.labelsize': 20,
'xtick.labelsize': 20,
'ytick.labelsize': 20,
'legend.fontsize': 20,
'figure.titlesize': 20,
'figure.figsize': [10,10]
})
#Basic Inputs
fig, ax = plt.subplots()
title = input("Title: ")
xlab = input("X-axis Label: ")
ylab = input("Y-axis Label: ")
size = input("Figure Size [w, h]: ")
#Set Labels
if size!="def":
plt.rcParams.update({'figure.figsize': ast.literal_eval(size)})
ax.set_xlabel(xlab)
ax.set_ylabel(ylab)
ax.set_title(title)
#Ask for data and add to plot
num = int(input("Number of Datasets: "))
if num==1:
lc = input("Line Color: ")
if lc=='def':
lc='black'
ls = input("Line Style (-,--,:,-.): ")
lw = input("Line Width (def=1): ")
if lw=='def':
lw=1
else:
lw=float(lw)
ax.plot(x,y,color=lc,linestyle=ls,linewidth=lw)
if num>1:
for i in range(num):
dl = input("Data Label: ")
#data = input("First Data Set ([[x],[y]]): ")
#data = ast.literal_eval(data)
lc = input("Line Color: ")
if lc=='def':
lc='black'
ls = input("Line Style (-,--,:,-.): ")
lw = input("Line Width (def=1): ")
if lw=='def':
lw=1
else:
lw=float(lw)
ax.plot(x[i],y[i],label=dl,color=lc,linestyle=ls,linewidth=lw)
ax.legend(loc='center', bbox_to_anchor=(0.5, 1.01), ncol=num, frameon=False)
plt.tight_layout()
plt.show()
################################# BASIC PLOT CODE #################################
# Basic Styling
plt.rcParams.update({
'font.family': 'Courier New', # monospace font
'font.size': 20, # Fonts
'axes.titlesize': 20, # |
'axes.labelsize': 20, # V
'xtick.labelsize': 20,
'ytick.labelsize': 20,
'legend.fontsize': 20,
'figure.titlesize': 20,
'figure.figsize': [10,10] # Figure Size
})
# Figure Setup
fig, ax = plt.subplots()
title = '' # Title
xlab = '' # X Label
ylab = '' # Y Label
ax.set_xlabel(xlab)
ax.set_ylabel(ylab)
ax.set_title(title, pad = 20) #pad controls distance to plot
ax.spines['top'].set_visible(False) # Controls non axis borders
ax.spines['right'].set_visible(False)
x_min = 0 # Axis Limits and Ticks
x_max = 1
x_step_maj = 1 #steps not division
x_step_min = 1
y_min = 0
y_max = 1
y_step_maj = 1
y_step_min = 1
ax.set_xlim(x_min,x_max) # X limits
ax.set_xticks(np.arange(x_min,x_max,x_step_maj)) # X Major Ticks
ax.set_xticks(np.arange(x_min,x_max,x_step_min), minor=True) # X Minor Ticks
ax.set_ylim(y_min,y_max) # Y limits
ax.set_yticks(np.arange(y_min,y_max,y_step_maj)) # Y Major Ticks
ax.set_yticks(np.arange(y_min,y_max,y_step_min),minor=True) # Y Minor Ticks
ax.grid(True, which='major',alpha=0.5) # Turn On Major Grid
ax.grid(True, which='minor',alpha=0.2) # Turn on Minor Grid
# alpha controls transparency
###################### Single Line ######################
x = []
y = []
ax.plot(x,y,color='black',linestyle='-',linewidth='1')
# Basic Line Styles: -, --, :, -.
# Basic Colors: red, blue, green, purple, cyan, magenta, black, brown, etc
# Can Specify Hex code for colors
ax.scatter(x,y,color='black',marker='o',size=20)
# Many Markers: circle-'o', square-'s', triangle-'^',star-'*', x-'x'
plt.show()
###################### Multi Line ######################
x = [[],[]] # List of Lists
y = [[],[]] # List of Lists
#### Lists must be equal length ###
dl = [] # Data Labels (list)
lc = [] # Line Color |
ls = [] # Line Style |
lw = [] # Line Width V
a = [] # Transparency
s = [] # Marker Size, 20 is default
m = [] # Marker Type, 'o' is default
# Use color-hex.com for color pallets
# Common ones: Shades of Teal, Ocean Breezes By,Ppt Cv
# Green Palette:
'#002005'
'#164f29'
'#3b7639'
'#638d66'
'#b5c5b4'
for i in range(len(x)):
ax.plot(x[i],y[i],label=dl[i],color=lc[i],linestyle=ls[i],linewidth=lw[i], alpha=a[i])
#ax.scatter(x[i],y[i],label=dl[i],color=lc[i],marker=m[i],size=s[i])
ax.legend(loc='center', bbox_to_anchor=(0.5, 1.01), ncol=len(x), frameon=False, labelspacing=0.2, columnspacing=0.75,
handlelength=0.75, handletextpad=0.3)
# anchor loc is based on the plot area, 0.5 is half the width, 1.01 is just above the top
# labelspacing is for vertical spacing, column is for horizontal, handel is for line length, textpad is for handl eto text
plt.tight_layout()
plt.show()

View File

@@ -0,0 +1,121 @@
import numpy as np
import matplotlib.pyplot as plt
def get_data(filename):
file = open(filename)
title = file.readline()
lines = file.readlines()
x = []
y = []
x_shift = []
y_shift = []
for line in lines:
line.strip()
data = line.split()
if float(data[0])<=180:
x.append(float(data[0]))
y.append(float(data[1]))
else:
x_shift.append(float(data[0])-360)
y_shift.append(float(data[1]))
return x_shift+x, y_shift+y
x_meas, y_meas = get_data('Python/Plotting/Base/Measured_P.txt')
x_sim, y_sim = get_data("Python/Plotting/Base/Simulated_P.txt")
for i in x_meas:
print(i)
################################# BASIC PLOT CODE #################################
# Basic Styling
plt.rcParams.update({
'font.family': 'Courier New', # monospace font
'font.size': 20, # Fonts
'axes.titlesize': 20, # |
'axes.labelsize': 20, # V
'xtick.labelsize': 15,
'ytick.labelsize': 15,
'legend.fontsize': 15,
'figure.titlesize': 20,
'figure.figsize': [10,5] # Figure Size
})
# Figure Setup
fig, ax = plt.subplots()
title = 'Cylinder Pressure Trace' # Title
xlab = '' # X Label
ylab = 'Pressure [Bar]' # Y Label
ax.set_xlabel(xlab)
ax.set_ylabel(ylab)
ax.set_title(title, pad = 20) #pad controls distance to plot
ax.spines['top'].set_visible(False) # Controls non axis borders
ax.spines['right'].set_visible(False)
x_min = -180 # Axis Limits and Ticks
x_max = 180
x_step_maj = 1 #steps not division
x_step_min = 1
y_min = 0
y_max = 36
y_step_maj = 5
y_step_min = 1
ax.set_xlim(x_min,x_max) # X limits
ax.set_xticks([-180,-90,0,90,180],['BDC','Intake/Compression','TDC','Exhaust/Expansion','BDC']) # X Major Ticks
ax.set_xticks([-180,-90,0,90,180], minor=True) # X Minor Ticks
ax.set_ylim(y_min,y_max) # Y limits
ax.set_yticks(np.arange(y_min,y_max,y_step_maj)) # Y Major Ticks
# ax.set_yticks(np.arange(y_min,y_max,y_step_min),minor=True) # Y Minor Ticks
ax.grid(True, which='major',alpha=0.5) # Turn On Major Grid
ax.grid(True, which='minor',alpha=0.2) # Turn on Minor Grid
# alpha controls transparency
###################### Single Line ######################
# x = []
# y = []
# ax.plot(x,y,color='black',linestyle='-',linewidth='1')
# # Basic Line Styles: -, --, :, -.
# # Basic Colors: red, blue, green, purple, cyan, magenta, black, brown, etc
# # Can Specify Hex code for colors
# ax.scatter(x,y,color='black',marker='o',size=20)
# # Many Markers: circle-'o', square-'s', triangle-'^',star-'*', x-'x'
# plt.show()
###################### Multi Line ######################
x = [x_sim,x_meas] # List of Lists
y = [y_sim,y_meas] # List of Lists
#### Lists must be equal length ###
dl = ['Simulated','Measured'] # Data Labels (list)
lc = ['black','black'] # Line Color |
ls = ['-','--'] # Line Style |
lw = [2,2] # Line Width V
a = [1,1] # Transparency
s = [] # Marker Size, 20 is default
m = [] # Marker Type, 'o' is default
# Use color-hex.com for color pallets
# Common ones: Shades of Teal, Ocean Breezes By,Ppt Cv
for i in range(len(x)):
ax.plot(x[i],y[i],label=dl[i],color=lc[i],linestyle=ls[i],linewidth=lw[i], alpha=a[i])
#ax.scatter(x[i],y[i],label=dl[i],color=lc[i],marker=m[i],size=s[i])
ax.legend(loc='center', bbox_to_anchor=(0.8,0.8), ncol=1, frameon=True,edgecolor='white',framealpha=1, labelspacing=0.2,
columnspacing=0.75,handlelength=0.75, handletextpad=0.3)
# anchor loc is based on the plot area, 0.5 is half the width, 1.01 is just above the top
# labelspacing is for vertical spacing, column is for horizontal, handel is for line length, textpad is for handl eto text
plt.tight_layout()
plt.show()

View File

@@ -0,0 +1,360 @@
Measured
0.62941825 1.4159249
0.6292404 1.4162701
0.62146497 1.4501166
0.61364883 1.4846574
0.6057943 1.5103542
0.5979039 1.5425
0.58998007 1.5685343
0.58202535 1.59443
0.57404226 1.6333632
0.5660334 1.6624316
0.5580015 1.6914659
0.5499493 1.7277586
0.5418794 1.7718027
0.5337947 1.800122
0.525698 1.820073
0.51759225 1.864939
0.50948024 1.9143927
0.50136495 1.9424458
0.49324933 1.9689004
0.48513648 2.0007682
0.47702935 2.0428734
0.46893105 2.092996
0.46084467 2.1401384
0.4527733 2.1865857
0.44472015 2.2368457
0.43668833 2.285979
0.42868105 2.3294344
0.42070147 2.3846078
0.41275287 2.4397848
0.40483844 2.4869232
0.39696145 2.5410275
0.3891251 2.599124
0.38133273 2.6664405
0.37358752 2.7430947
0.36589277 2.8212624
0.35825172 2.9068794
0.35066766 2.9896586
0.34314382 3.0711071
0.3356835 3.1559534
0.32828987 3.2481284
0.3209662 3.3423545
0.3137157 3.4481862
0.3065416 3.5555441
0.299447 3.6477833
0.29243514 3.7581906
0.2855091 3.889259
0.27867204 4.0075665
0.27192703 4.1237774
0.26527712 4.257856
0.25872535 4.3807116
0.2522747 4.49738
0.24592812 4.6305895
0.23968853 4.778136
0.23355883 4.9141903
0.22754185 5.046443
0.22164036 5.1944184
0.21585713 5.356183
0.21019486 5.505464
0.2046562 5.6514354
0.19924374 5.813004
0.19396004 5.978728
0.18880758 6.1567254
0.1837888 6.3394485
0.17890608 6.51239
0.17416175 6.682379
0.16955803 6.872758
0.16509715 7.0743103
0.16078122 7.270871
0.1566123 7.464198
0.15259242 7.650001
0.14872345 7.847092
0.1450073 8.05476
0.14144573 8.25817
0.13804047 8.466103
0.13479313 8.678619
0.13170531 8.887357
0.1287785 9.093097
0.1260141 9.296996
0.12341346 9.500862
0.12097783 9.696824
0.118708394 9.896242
0.11660625 10.104578
0.11467242 10.3127575
0.11290786 10.516966
0.111313395 10.735301
0.10988983 10.967971
0.10863784 11.187811
0.10755804 11.409951
0.10665096 11.649704
0.10591704 11.915226
0.105356626 12.229004
0.10497 12.624488
0.10475736 13.143764
0.1047188 13.786082
0.10485433 14.520525
0.105163895 15.332433
0.10564734 16.170528
0.10630444 16.998716
0.10713486 17.836205
0.1081382 18.687443
0.10931398 19.54697
0.11066161 20.403082
0.11218046 21.247686
0.113869764 22.036057
0.11572872 22.71839
0.11775642 23.26616
0.11995187 23.68012
0.12231401 23.940948
0.12484171 24.036562
0.12753372 24.002546
0.13038875 23.838465
0.13340543 23.561995
0.13658229 23.203642
0.13991778 22.799614
0.14341031 22.359493
0.1470582 21.85754
0.15085968 21.322016
0.15481295 20.801252
0.15891609 20.280685
0.16316713 19.73843
0.16756406 19.20285
0.17210476 18.69489
0.17678708 18.206665
0.18160878 17.71212
0.18656757 17.224617
0.1916611 16.758638
0.19688697 16.321344
0.2022427 15.886558
0.20772576 15.454157
0.2133336 15.048209
0.21906358 14.662399
0.224913 14.274215
0.23087916 13.895381
0.23695928 13.534915
0.24315053 13.182266
0.24945007 12.846317
0.255855 12.517049
0.26236233 12.182421
0.26896915 11.861401
0.2756724 11.56014
0.28246906 11.26839
0.28935605 10.979116
0.29633027 10.702868
0.3033886 10.4279375
0.3105279 10.14496
0.31774494 9.877815
0.3250366 9.626582
0.3323996 9.373955
0.3398308 9.122279
0.34732687 8.878942
0.35488465 8.648123
0.36250088 8.421089
0.37017223 8.19121
0.37789547 7.972817
0.38566738 7.772068
0.39348465 7.5814505
0.40134403 7.3918085
0.40924227 7.201997
0.41717616 7.010725
0.42514238 6.825191
0.4331378 6.6581683
0.44115913 6.4980865
0.44920325 6.3391433
0.45726693 6.188291
0.46534702 6.038029
0.47344044 5.887462
0.48154402 5.7555532
0.48965472 5.633255
0.49776947 5.5115786
0.5058853 5.3980837
0.5139991 5.292057
0.522108 5.1872706
0.5302091 5.084621
0.53829944 4.98922
0.5463762 4.9015737
0.5544366 4.8137655
0.5624779 4.7252154
0.5704973 4.639823
0.5784921 4.5569577
0.5864597 4.4713645
0.59439754 4.3851833
0.6023031 4.3041406
0.61017376 4.2280955
0.6180072 4.1580935
0.62580097 4.0861855
0.63355273 4.0174384
0.64126015 3.9544528
0.648921 3.8897464
0.6565331 3.8209789
0.6640943 3.7516003
0.67160255 3.680018
0.67905575 3.604746
0.686452 3.519643
0.69378924 3.4237425
0.7010657 3.3397286
0.70827955 3.2586088
0.715429 3.1583288
0.7225123 3.048317
0.72952783 2.9438803
0.736474 2.8399181
0.7433492 2.7352245
0.75015193 2.626329
0.7568808 2.5070345
0.76353437 2.394028
0.7701112 2.2937562
0.77661014 2.1945186
0.7830298 2.0955625
0.7893691 1.9953909
0.79562676 1.8912864
0.8018018 1.7923512
0.80789304 1.7011157
0.8138995 1.6124156
0.8198202 1.5277588
0.82565427 1.4490067
0.83140075 1.3761914
0.8370588 1.310608
0.84262764 1.2587739
0.8481065 1.2086323
0.85349464 1.1568456
0.85879135 1.1058809
0.8639961 1.0614659
0.8691081 1.0355427
0.8741268 1.0164967
0.87905174 0.9934473
0.88388234 0.9782406
0.8886181 0.9687869
0.8932586 0.9502075
0.89780337 0.939276
0.902252 0.9436065
0.9066042 0.9387441
0.9108595 0.9363957
0.9150177 0.94382405
0.9190784 0.95158124
0.9230414 0.9563113
0.92690635 0.9638647
0.93067306 0.9823345
0.9343413 1.0064347
0.9379109 1.0193701
0.94138163 1.0261184
0.9447534 1.0512638
0.94802594 1.0709031
0.95119923 1.0724144
0.9542731 1.0755404
0.9572474 1.0784599
0.96012205 1.0839422
0.96289706 1.0826727
0.9655722 1.0793967
0.9681475 1.0930203
0.9706229 1.0965391
0.97299826 1.0801593
0.97527367 1.0683249
0.977449 1.0641904
0.97952425 1.0710913
0.9814994 1.0766206
0.98337436 1.0752534
0.98514926 1.0738416
0.986824 1.0780787
0.98839855 1.0755196
0.98987293 1.0677567
0.9912471 1.07067
0.99252117 1.0804877
0.9936951 1.087186
0.9947688 1.085108
0.9957423 1.0764151
0.9966157 1.0731394
0.99738896 1.0747122
0.998062 1.0724411
0.99863493 1.0737307
0.9991078 1.0714661
0.9994804 1.0624795
0.99975294 1.0588353
0.9999253 1.0537856
0.99999756 1.0429349
0.99996966 1.0294797
0.99984163 1.0180243
0.99961346 1.0149299
0.9992852 1.0157316
0.9988568 1.0111974
0.9983282 1.0000876
0.9976995 0.9917807
0.9969706 0.98949444
0.9961416 0.994161
0.99521244 0.9889599
0.99418306 0.98513174
0.99305356 0.98472893
0.9918239 0.9852653
0.9904941 0.98835295
0.98906404 0.98572445
0.98753387 0.97893834
0.98590356 0.97510475
0.984173 0.9793767
0.98234236 0.980711
0.9804116 0.97125703
0.9783807 0.9688899
0.9762497 0.96881396
0.97401863 0.9613243
0.97168756 0.9593919
0.96925646 0.9597825
0.9667254 0.9600472
0.96409446 0.9599489
0.96136373 0.95407695
0.9585332 0.9495246
0.955603 0.9517564
0.95257324 0.95214516
0.949444 0.9542315
0.94621545 0.9468051
0.9428876 0.93094957
0.9394607 0.9314543
0.9359349 0.93752885
0.9323103 0.9322266
0.9285872 0.941523
0.9247657 0.962977
0.9208461 0.9678459
0.9168287 0.9650768
0.91271365 0.975347
0.9085013 0.98663884
0.90419203 0.97771454
0.89978606 0.97132206
0.8952838 0.9768297
0.8906857 0.9790908
0.88599205 0.97367156
0.8812034 0.9893024
0.8763202 1.0251051
0.87134296 1.0366
0.8662722 1.0465263
0.8611085 1.0848211
0.8558525 1.1191703
0.85050476 1.133844
0.845066 1.148908
0.8395369 1.1719776
0.8339183 1.1929169
0.8282109 1.213694
0.82241553 1.2199512
0.8165331 1.2246112
0.81056446 1.2287027
0.80451065 1.2308375
0.7983726 1.2473023
0.79215145 1.2606347
0.7858482 1.2693243
0.77946395 1.2727764
0.773 1.2804279
0.7664575 1.2882518
0.75983775 1.2877786
0.7531421 1.2806827
0.7463719 1.2775594
0.73952866 1.291898
0.73261374 1.2868485
0.72562873 1.2750502
0.71857524 1.274958
0.71145487 1.28322
0.70426935 1.2869114
0.6970204 1.2924124
0.68970984 1.306109
0.68233955 1.3148426
0.6749113 1.319715
0.66742724 1.3303853
0.6598892 1.3407135
0.6522994 1.3657143
0.6446599 1.3912835

View File

@@ -0,0 +1,359 @@
-92.0 1.49994
-91.045 1.5358741
-90.04221 1.5747739
-89.03943 1.6015724
-88.036644 1.6340126
-87.03386 1.670783
-86.03107 1.6916652
-85.02828 1.7275078
-84.0255 1.7654344
-83.02271 1.7854145
-82.01993 1.8194822
-81.01714 1.8705827
-80.01436 1.9102426
-79.01157 1.9390588
-78.00879 1.9744704
-77.006004 2.0226028
-76.00321 2.0527759
-75.00043 2.0764947
-73.99764 2.113165
-72.99486 2.1565006
-71.99207 2.203957
-70.98929 2.239184
-69.9865 2.2730813
-68.98372 2.3118153
-67.980934 2.346297
-66.97815 2.3983858
-65.97536 2.466354
-64.97257 2.5162356
-63.969788 2.5553286
-62.967003 2.6157835
-61.96422 2.679005
-60.961433 2.7451425
-59.95865 2.801526
-58.95586 2.8587923
-57.953075 2.928777
-56.95029 3.0244718
-55.947506 3.122418
-54.94472 3.2025068
-53.941933 3.296004
-52.939148 3.404564
-51.936363 3.516928
-50.93358 3.6313565
-49.930794 3.746737
-48.928005 3.8704386
-47.92522 4.016033
-46.922436 4.1591654
-45.91965 4.297891
-44.916866 4.450213
-43.914078 4.6128554
-42.911293 4.773245
-41.90851 4.9438257
-40.905724 5.123311
-39.902935 5.3002
-38.90015 5.4819884
-37.897366 5.668606
-36.89458 5.8655744
-35.891796 6.0592184
-34.889008 6.2564006
-33.886223 6.462807
-32.88344 6.680519
-31.880653 6.9080825
-30.877867 7.129336
-29.875082 7.3426743
-28.872295 7.566285
-27.86951 7.79594
-26.866726 8.017852
-25.86394 8.238896
-24.861155 8.469887
-23.858368 8.697036
-22.855583 8.919875
-21.852798 9.14525
-20.850012 9.366462
-19.847227 9.588287
-18.84444 9.806462
-17.841656 10.018648
-16.83887 10.227453
-15.836084 10.433891
-14.833299 10.642883
-13.830514 10.844865
-12.827728 11.036104
-11.824943 11.228933
-10.822157 11.428449
-9.819371 11.631645
-8.816586 11.834167
-7.8138003 12.05777
-6.8110147 12.308648
-5.8082294 12.583031
-4.805444 12.89164
-3.8026583 13.239749
-2.7998729 13.652845
-1.7970873 14.241348
-0.7943018 15.097665
0.20848373 16.156034
1.2112693 17.311827
2.2140548 18.629465
3.2168403 20.182745
4.219626 21.867989
5.222411 23.652916
6.225197 25.57259
7.2279825 27.519611
8.230768 29.343184
9.233553 30.930952
10.236339 32.23247
11.239124 33.238777
12.24191 33.993977
13.244696 34.477142
14.247481 34.611588
15.250266 34.398136
16.253052 33.894115
17.255838 33.221287
18.258623 32.43608
19.261408 31.547655
20.264194 30.601032
21.26698 29.644505
22.269766 28.675808
23.27255 27.696926
24.275335 26.731478
25.278122 25.764727
26.280907 24.819464
27.283693 23.934162
28.286478 23.070627
29.289263 22.225868
30.29205 21.424213
31.294834 20.662178
32.29762 19.936192
33.300407 19.242838
34.303192 18.5975
35.305977 17.98772
36.30876 17.396982
37.311546 16.828587
38.314335 16.285591
39.31712 15.777186
40.319904 15.303992
41.32269 14.858357
42.325474 14.424688
43.328262 14.006265
44.331047 13.608196
45.33383 13.23071
46.336617 12.866277
47.3394 12.509645
48.34219 12.166203
49.344975 11.841009
50.34776 11.5273485
51.350544 11.2272
52.35333 10.9426985
53.356117 10.668935
54.358902 10.400414
55.361687 10.140384
56.36447 9.890146
57.36726 9.642134
58.370045 9.404908
59.37283 9.175018
60.375614 8.949436
61.3784 8.737044
62.381187 8.543196
63.383972 8.35779
64.38676 8.169585
65.38954 7.9846306
66.39233 7.813252
67.39511 7.656072
68.397896 7.4997406
69.40068 7.335511
70.40347 7.1682205
71.40626 7.007455
72.40904 6.8548517
73.41183 6.7021093
74.41461 6.562641
75.4174 6.442068
76.42018 6.3234425
77.422966 6.2064185
78.42575 6.0916553
79.42854 5.9737186
80.43133 5.855297
81.43411 5.742545
82.4369 5.6421056
83.43968 5.5450706
84.44247 5.4420176
85.44525 5.343885
86.44804 5.242539
87.45082 5.1345644
88.453606 5.0409527
89.4564 4.950507
90.45918 4.8487654
91.46197 4.7431936
92.46475 4.64871
93.46754 4.5707674
94.47032 4.4867187
95.47311 4.3956923
96.47589 4.308978
97.478676 4.2200656
98.48146 4.121357
99.48425 4.004675
100.48704 3.876544
101.48982 3.749862
102.49261 3.6186206
103.49539 3.480858
104.49818 3.3373597
105.50096 3.1904325
106.503746 3.0482006
107.50653 2.9068234
108.50932 2.7632055
109.51211 2.621736
110.51489 2.4763553
111.51768 2.33616
112.52046 2.219924
113.52325 2.1094823
114.52603 1.9892626
115.52882 1.8689619
116.5316 1.7576358
117.534386 1.6642258
118.53718 1.5729184
119.53996 1.4829215
120.54275 1.4054621
121.54553 1.3275464
122.54832 1.2654024
123.5511 1.2165117
124.55389 1.1615419
125.55667 1.1109456
126.559456 1.0769604
127.56224 1.055147
128.56503 1.0252388
129.56781 0.9901923
130.5706 0.96990806
131.57338 0.95258635
132.57617 0.9336768
133.57896 0.9253882
134.58174 0.91230047
135.58453 0.90129495
136.58731 0.9054593
137.5901 0.91190815
138.59288 0.909744
139.59567 0.90060055
140.59845 0.89651513
141.60124 0.9008918
142.60403 0.9136557
143.60681 0.9320812
144.6096 0.94551986
145.61238 0.9487948
146.61517 0.9600983
147.61795 0.9731612
148.62074 0.97801316
149.62352 0.9859535
150.62631 0.9945002
151.62909 1.0036399
152.63188 1.0150312
153.63467 1.0259724
154.63745 1.0369852
155.64024 1.0350384
156.64302 1.0357995
157.64581 1.0359021
158.64859 1.0297711
159.65138 1.0229367
160.65416 1.0179937
161.65695 1.013861
162.65974 1.0129942
163.66252 1.0114627
164.66531 1.0127962
165.66809 1.0171802
166.67088 1.013339
167.67366 1.0141994
168.67645 1.0218638
169.67923 1.0163764
170.68202 1.0101875
171.68481 1.0091355
172.68759 1.0096533
173.69038 1.008341
174.69316 1.0026432
175.69595 1.0052398
176.69873 1.0060496
177.70152 0.9967013
178.7043 0.9878458
179.70709 0.9839804
180.70987 0.9760148
181.71266 0.9612156
182.71545 0.95233417
183.71823 0.94827366
184.72102 0.95032763
185.7238 0.9489888
186.7266 0.9413412
187.72937 0.9321435
188.73216 0.9269663
189.73494 0.9275942
190.73773 0.931649
191.74052 0.93175244
192.7433 0.9294
193.7461 0.9268199
194.74887 0.92264336
195.75166 0.91768956
196.75444 0.91781014
197.75723 0.9279098
198.76001 0.9326931
199.7628 0.9248333
200.76558 0.9208289
201.76837 0.92364204
202.77116 0.9299292
203.77394 0.9292018
204.77673 0.9185374
205.77951 0.91318405
206.7823 0.9146962
207.78508 0.91144925
208.78787 0.90992945
209.79065 0.911773
210.79344 0.9122371
211.79623 0.90611064
212.79901 0.90441227
213.8018 0.9121109
214.80458 0.90272975
215.80737 0.89632297
216.81015 0.89989316
217.81294 0.9051845
218.81572 0.9100196
219.81851 0.9102259
220.8213 0.9135357
221.82408 0.91254646
222.82687 0.92026895
223.82965 0.9256599
224.83244 0.93140644
225.83522 0.94289523
226.83801 0.9277499
227.84079 0.9251155
228.84358 0.9344981
229.84636 0.93383306
230.84915 0.9371384
231.85194 0.9566001
232.85472 0.98191655
233.85751 1.0115029
234.86029 1.052593
235.86308 1.0647767
236.86586 1.0809778
237.86865 1.1169581
238.87143 1.144694
239.87422 1.1597354
240.87701 1.1733167
241.87979 1.1917465
242.88258 1.2060626
243.88536 1.2150607
244.88815 1.224319
245.89093 1.2263381
246.89372 1.2341791
247.8965 1.2424152
248.89929 1.253828
249.90208 1.259936
250.90486 1.2629273
251.90765 1.2670362
252.91043 1.2750268
253.91322 1.2844045
254.916 1.2853887
255.9188 1.2811004
256.92157 1.2833349
257.92435 1.2966868
258.92715 1.3158177
259.92993 1.3382878
260.9327 1.3550657
261.93552 1.370769
262.9383 1.3981235
263.94107 1.4086291
264.94385 1.4224737
265.94666 1.4538087
266.94943 1.4778475

View File

@@ -0,0 +1,89 @@
import numpy as np
import matplotlib.pyplot as plt
x_data = np.linspace(0,10,150)
y1 = np.sin(3*x_data+(3.14159/2))
y2 = 1.5*np.e**(-0.7*x_data)
y3 = 1.5*np.e**(-0.7*x_data)*np.sin(3*x_data+(3.14159/2))
################################# BASIC PLOT CODE #################################
# Basic Styling
plt.rcParams.update({
'font.family': 'Courier New', # monospace font
'font.size': 20, # Fonts
'axes.titlesize': 30, # |
'axes.labelsize': 25, # V
'xtick.labelsize': 20,
'ytick.labelsize': 20,
'legend.fontsize': 20,
'figure.titlesize': 30,
'figure.figsize': [9,6] # Figure Size
})
# Figure Setup
fig, ax = plt.subplots()
title = 'Damped Oscillation' # Title
xlab = 'Time' # X Label
ylab = 'Force' # Y Label
ax.set_xlabel(xlab)
ax.set_ylabel(ylab)
ax.set_title(title, pad=40)
#fig.suptitle(title)
x_min = 0 # Axis Limits and Ticks
x_max = 10
x_step = 1
y_min = -1.5
y_max = 1.6
y_step = 1
ax.set_xlim(x_min,x_max)
ax.set_xticks(np.arange(x_min,x_max,x_step))
ax.set_xticks(np.arange(x_min,x_max,0.5), minor=True)
ax.set_ylim(y_min,y_max)
ax.set_yticks(np.arange(y_min,y_max,y_step))
ax.set_yticks(np.arange(y_min,y_max,0.5),minor=True)
#ax.minorticks_on()
ax.grid(True, which='major',alpha=0.5)
ax.grid(True, which='minor',alpha=0.2)
###################### Single Line ######################
# x = []
# y = []
# ax.plot(x,y,color='black',linestyle='-',linewidth='1')
# # Basic Line Styles: -, --, :, -.
# # Basic Colors: red, blue, green, purple, cyan, magenta, black, brown, etc
# # Can Specify Hex code for colors
# plt.show()
###################### Multi Line ######################
x = [x_data,x_data,x_data] # List of Lists
y = [y1,y2,y3] # List of Lists
#### Lists must be equal length ###
dl = ['Sine Part', 'Exponential Part','Result'] # Data Labels (list)
lc = ['#ae5a41', '#559e83','#5a5255'] # Line Color |
ls = ['--','--','-'] # Line Style |
lw = ['1','1','2'] # Line Width V
for i in range(len(x)):
ax.plot(x[i],y[i],label=dl[i],color=lc[i],linestyle=ls[i],linewidth=lw[i])
ax.legend(loc='center', bbox_to_anchor=(0.5, 1.04), ncol=len(x), frameon=False, columnspacing=1, handlelength=0.75,
handletextpad=0.2)
# anchor loc is based on the plot area, 0.5 is half the width, 1.01 is just above the top
plt.tight_layout()
plt.show()

View File

@@ -0,0 +1,117 @@
import numpy as np
import matplotlib.pyplot as plt
def get_data(filename):
file = open(filename)
title = file.readline()
lines = file.readlines()
x = []
y = []
for line in lines:
line.strip()
data = line.split()
x.append(float(data[0]))
y.append(float(data[1]))
return x, y
x_meas, y_meas = get_data('Plotting\Base\Measured.txt')
x_sim, y_sim = get_data("Plotting\Base\Simulated.txt")
#print(min(x_meas),min(x_sim))
################################# BASIC PLOT CODE #################################
# Basic Styling
plt.rcParams.update({
'font.family': 'Courier New', # monospace font
'font.size': 20, # Fonts
'axes.titlesize': 30, # |
'axes.labelsize': 20, # V
'xtick.labelsize': 15,
'ytick.labelsize': 15,
'legend.fontsize': 20,
'figure.titlesize': 20,
'figure.figsize': [10,10] # Figure Size
})
# Figure Setup
fig, ax = plt.subplots()
title = 'PV Diagram' # Title
xlab = '% of Volume' # X Label
ylab = 'Cyinder Pressure [Bar]' # Y Label
ax.set_xlabel(xlab)
ax.set_ylabel(ylab, labelpad=0)
ax.set_title(title, pad = 0) #pad controls distance to plot
ax.spines['top'].set_visible(False) # Controls non axis borders
ax.spines['right'].set_visible(False)
# ax.set_xscale('log')
# ax.set_yscale('log')
x_min = 0 # Axis Limits and Ticks
x_max = 1.1
x_step_maj = 1 #steps not division
x_step_min = 1
y_min = 0
y_max = 25
y_step_maj = 25
y_step_min = 1
ax.set_xlim(x_min,x_max) # X limits
ax.set_xticks([0.1047,1]) # X Major Ticks
# ax.set_xticks(np.arange(x_min,x_max,x_step_min), minor=True) # X Minor Ticks
ax.set_ylim(y_min,y_max) # Y limits
ax.set_yticks([24.04,24.68]) # Y Major Ticks
# ax.set_yticks(np.arange(y_min,y_max,y_step_min),minor=True) # Y Minor Ticks
# ax.grid(True, which='major',alpha=1, lw=1, ls='--', color='black') # Turn On Major Grid
# ax.grid(True, which='minor',alpha=0.2) # Turn on Minor Grid
# alpha controls transparency
###################### Single Line ######################
# x = []
# y = []
# ax.plot(x,y,color='black',linestyle='-',linewidth='1')
# # Basic Line Styles: -, --, :, -.
# # Basic Colors: red, blue, green, purple, cyan, magenta, black, brown, etc
# # Can Specify Hex code for colors
# ax.scatter(x,y,color='black',marker='o',size=20)
# # Many Markers: circle-'o', square-'s', triangle-'^',star-'*', x-'x'
# plt.show()
###################### Multi Line ######################
x = [x_meas,x_sim,[1,1],[.107,.107],[0,.125],[0,.125]] # List of Lists
y = [y_meas,y_sim,[0,1.1],[0,12.5],[24.04,24.04],[24.68,24.68]] # List of Lists
#### Lists must be equal length ###
dl = ['Measured', 'Simulated','','','',''] # Data Labels (list)
lc = ['black', 'black','black','black','black','black'] # Line Color |
ls = ['-','--','--','--', '--','--'] # Line Style |
lw = [1.5,2,1,1,1,1] # Line Width V
a = [1,1,1,1,1,1]
s = [] # Marker Size, 20 is default
m = [] # Marker Type, 'o' is default
# Use color-hex.com for color pallets
# Common ones: Shades of Teal, Ocean Breezes By,Ppt Cv
for i in range(len(x)):
ax.plot(x[i],y[i],label=dl[i],color=lc[i],linestyle=ls[i],linewidth=lw[i],alpha=a[i])
#ax.scatter(x[i],y[i],label=dl[i],color=lc[i],marker=m[i],size=s[i])
ax.legend(loc='upper right', bbox_to_anchor=(0.85, 0.85), ncol=1, frameon=False, labelspacing=0.2, columnspacing=0.75,
handlelength=1, handletextpad=0.3)
# anchor loc is based on the plot area, 0.5 is half the width, 1.01 is just above the top
# labelspacing is for vertical spacing, column is for horizontal, handel is for line length, textpad is for handl eto text
plt.tight_layout()
plt.show()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,233 @@
import numpy as np
import matplotlib.pyplot as plt
def get_data(filename):
file = open(filename)
lines = file.readlines()
x = []
y = []
for i in range(len(lines)):
if i % 2 == 0:
lines[i].strip()
data = lines[i].split()
x.append(float(data[0]))
y.append(float(data[1]))
return x, y
time, power = get_data('Drone Comparison Data for Dan/required_power.txt')
time1, e_power = get_data('Drone Comparison Data for Dan/engine_power.txt')
time2, hb_power = get_data('Drone Comparison Data for Dan/hybrid_battery_power.txt')
time3, bo_power = get_data('Drone Comparison Data for Dan/battery_only_power.txt')
time4, hb_soc_small = get_data('Drone Comparison Data for Dan/hybrid_SOC.txt')
time5, bo_soc_small = get_data('Drone Comparison Data for Dan/battery_only_SOC.txt')
hb_soc =[]
bo_soc = []
for data in hb_soc_small:
hb_soc.append(data*100)
for data in bo_soc_small:
bo_soc.append(data*100)
# Basic Styling
plt.rcParams.update({
'font.family': 'Courier New', # monospace font
'font.size': 20, # Fonts
'axes.titlesize': 20, # |
'axes.labelsize': 15, # V
'xtick.labelsize': 15,
'ytick.labelsize': 15,
'legend.fontsize': 15,
'figure.titlesize': 20,
'figure.figsize': [10,10] # Figure Size
})
# Figure Setup
fig, ax = plt.subplots(3, 1, gridspec_kw={'height_ratios': [3, 2, 2]})
title = 'Power Output vs Time' # Title
# fig.suptitle(title, y=0.95) #pad controls distance to plot
### Figure 1 (top) ###
x_1_title = 'Jetfire Hybrid System Power Output'
ax[0].set_title(x_1_title)
x_1_lab = 'Time [min]' # X Label
y_1_lab = 'Power [kW]' # Y Label
ax[0].set_xlabel(x_1_lab)
ax[0].set_ylabel(y_1_lab)
ax[0].spines['top'].set_visible(False) # Controls non axis borders
ax[0].spines['right'].set_visible(False)
ax[0].spines['bottom'].set_visible(False)
### Figure 2 (middle) ###
x_2_title = 'Electric System Power Output'
ax[1].set_title(x_2_title)
x_2_lab = 'Time [min]' # X Label
y_2_lab = 'Power [kW]' # Y Label
ax[1].set_xlabel(x_2_lab)
ax[1].set_ylabel(y_2_lab)
ax[1].spines['top'].set_visible(False) # Controls non axis borders
ax[1].spines['right'].set_visible(False)
### Figure 3 (middle) ###
x_3_title = 'State of Charge'
ax[2].set_title(x_3_title)
x_3_lab = 'Time [min]' # X Label
y_3_lab = 'Charge [%]' # Y Label
ax[2].set_xlabel(x_3_lab)
ax[2].set_ylabel(y_3_lab)
ax[2].spines['top'].set_visible(False) # Controls non axis borders
ax[2].spines['right'].set_visible(False)
### axis is the same for both graphs ###
### x displays on bottom graph only ###
x_1_min = 0 # Axis Limits and Ticks
x_1_max = 95
x_1_step_maj = 10 #steps not division
x_1_step_min = 1
ax[0].set_xlim(x_1_min,x_1_max) # X limits
ax[0].set_xticks(np.arange(x_1_min,x_1_max,x_1_step_maj)) # X Major Ticks
# ax[1].set_xticks([-180,-90,0,90,180], minor=True) # X Minor Ticks
x_2_min = 0 # Axis Limits and Ticks
x_2_max = 9.5
x_2_step_maj = 1 #steps not division
x_2_step_min = 1
ax[1].set_xlim(x_2_min,x_2_max) # X limits
ax[1].set_xticks(np.arange(x_2_min,x_2_max,x_2_step_maj)) # X Major Ticks
# ax[1].set_xticks([-180,-90,0,90,180], minor=True) # X Minor Ticks
x_3_min = 0 # Axis Limits and Ticks
x_3_max = 95
x_3_step_maj = 10 #steps not division
x_3_step_min = 1
ax[2].set_xlim(x_3_min,x_3_max) # X limits
ax[2].set_xticks(np.arange(x_3_min,x_3_max,x_3_step_maj)) # X Major Ticks
# ax[1].set_xticks([-180,-90,0,90,180], minor=True) # X Minor Ticks
### Figure 1 (top) ###
y_1_min = -5
y_1_max = 17
y_1_step_maj = 5
y_1_step_min = 1
ax[0].set_ylim(y_1_min,y_1_max) # Y limits
ax[0].set_yticks(np.arange(y_1_min,y_1_max,y_1_step_maj)) # Y Major Ticks
# ax.set_yticks(np.arange(y_min,y_max,y_step_min),minor=True) # Y Minor Ticks
ax[0].grid(True, which='major',alpha=0.5) # Turn On Major Grid
# ax[0].grid(True, which='minor',alpha=0.2) # Turn on Minor Grid
# alpha controls transparency
### Figure 2 (bottom) ###
y_2_min = 0
y_2_max = 17
y_2_step_maj = 5
y_2_step_min = 1
ax[1].set_ylim(y_2_min,y_2_max) # Y limits
ax[1].set_yticks(np.arange(y_2_min,y_2_max,y_2_step_maj)) # Y Major Ticks
# ax[1].set_yticks(np.arange(y_2_min,y_2_max,y_2_step_min),minor=True) # Y Minor Ticks
ax[1].grid(True, which='major',alpha=0.5) # Turn On Major Grid
# ax[1].grid(True, which='minor',alpha=0.2) # Turn on Minor Grid
# alpha controls transparency
y_3_min = 0
y_3_max = 110
y_3_step_maj = 25
y_3_step_min = 1
ax[2].set_ylim(y_3_min,y_3_max) # Y limits
ax[2].set_yticks(np.arange(y_3_min,y_3_max,y_3_step_maj)) # Y Major Ticks
# ax[1].set_yticks(np.arange(y_2_min,y_2_max,y_2_step_min),minor=True) # Y Minor Ticks
ax[2].grid(True, which='major',alpha=0.5) # Turn On Major Grid
# ax[1].grid(True, which='minor',alpha=0.2) # Turn on Minor Grid
# alpha controls transparency
###################### Single Line ######################
'''
# x = []
# y = []
ax.plot(x,y,color='black',linestyle='-',linewidth='1')
# Basic Line Styles: -, --, :, -.
# Basic Colors: red, blue, green, purple, cyan, magenta, black, brown, etc
# Can Specify Hex code for colors
# ax.scatter(x,y,color='black',marker='o',size=20)
# # Many Markers: circle-'o', square-'s', triangle-'^',star-'*', x-'x'
# plt.show()
'''
###################### Stacked Line ######################
x1 = [time, time1, time2,[71.5,71.5],[0,95]] # List of Lists
y1 = [power, e_power, hb_power,[-2,10],[0,0]] # List of Lists
dl1 = ['Total Power','Jetfire Engine','Electric Motor','Fuel Runs Out',''] # Data Labels (list)
lc1 = ["#A30F48","#1db9be","#0C53AF",'black','black'] # Line Color |
ls1 = ['-','-','-',':','-'] # Line Style |
lw1 = [2,2,2,1.5,1] # Line Width V
a1 = [1,1,1,1,1] # Transparency
for i in range(len(x1)):
ax[0].plot(x1[i],y1[i],label=dl1[i],color=lc1[i],linestyle=ls1[i],linewidth=lw1[i], alpha=a1[i])
ax[0].legend(loc='center', bbox_to_anchor=(0.6,0.8), ncol=2, frameon=True,edgecolor='white',framealpha=1, labelspacing=0.2, columnspacing=0.75,handlelength=0.9, handletextpad=0.3)
# anchor loc is based on the plot area, 0.5 is half the width, 1.01 is just above the top
# labelspacing is for vertical spacing, column is for horizontal, handel is for line length, textpad is for handl eto text
x2 = [time3] # List of Lists
y2 = [bo_power] # List of Lists
dl2 = ['Electric Motor'] # Data Labels (list)
lc2 = ['#008349'] # Line Color |
ls2 = ['-'] # Line Style |
lw2 = [2] # Line Width V
a2 = [1] # Transparency
for i in range(len(x2)):
ax[1].plot(x2[i],y2[i],label=dl2[i],color=lc2[i],linestyle=ls2[i],linewidth=lw2[i], alpha=a2[i])
# ax[1].fill_between(x_temp,y_temp,hatch='///', alpha=0)
# ax[1].legend(loc='center', bbox_to_anchor=(0.8,0.8), ncol=1, frameon=True,edgecolor='white',framealpha=1, labelspacing=0.2, columnspacing=0.75,handlelength=0.9, handletextpad=0.3)
# anchor loc is based on the plot area, 0.5 is half the width, 1.01 is just above the top
# labelspacing is for vertical spacing, column is for horizontal, handel is for line length, textpad is for handl eto text
x3 = [time4, time5] # List of Lists
y3 = [hb_soc, bo_soc] # List of Lists
dl3 = ['Hybrid', 'Electric'] # Data Labels (list)
lc3 = ["#1db9be","#0C53AF"] # Line Color |
ls3 = ['-','-'] # Line Style |
lw3 = [2,2] # Line Width V
a3 = [1,1] # Transparency
for i in range(len(x3)):
ax[2].plot(x3[i],y3[i],label=dl3[i],color=lc3[i],linestyle=ls3[i],linewidth=lw3[i], alpha=a3[i])
ax[2].legend(loc='center', bbox_to_anchor=(0.65,0.45), ncol=2, frameon=True,edgecolor='white',framealpha=1, labelspacing=0.2, columnspacing=0.75,handlelength=0.9, handletextpad=0.3)
plt.tight_layout()
plt.show()

View File

@@ -0,0 +1,553 @@
1.6666666666666666E-4 1.0
0.017 0.999974
0.03383333333333333 0.99991953
0.050666666666666665 0.99968255
0.0675 0.998828
0.08433333333333333 0.99715024
0.10116666666666667 0.99521005
0.118 0.9932359
0.13483333333333333 0.9912516
0.15166666666666667 0.9892898
0.1685 0.9873774
0.18533333333333332 0.985608
0.20216666666666666 0.9838381
0.219 0.98192155
0.23583333333333334 0.9800435
0.25266666666666665 0.97810096
0.2695 0.97614247
0.28633333333333333 0.9741843
0.30316666666666664 0.97222644
0.32 0.97026896
0.3368333333333333 0.9683118
0.3536666666666667 0.96635497
0.3705 0.96439844
0.3873333333333333 0.96244234
0.4041666666666667 0.96048653
0.421 0.9585311
0.43783333333333335 0.95657593
0.45466666666666666 0.95462114
0.4715 0.9526667
0.48833333333333334 0.9507126
0.5051666666666667 0.94875884
0.522 0.9468055
0.5388333333333334 0.94485235
0.5556666666666666 0.94289964
0.5725 0.9409473
0.5893333333333334 0.93899524
0.6061666666666666 0.93704355
0.623 0.9350922
0.6398333333333334 0.9331412
0.6566666666666666 0.93119055
0.6735 0.9292402
0.6903333333333334 0.92729026
0.7071666666666667 0.92534065
0.724 0.92339134
0.7408333333333333 0.92144245
0.7576666666666667 0.91949385
0.7745 0.9175456
0.7913333333333333 0.91559774
0.8081666666666667 0.9136502
0.825 0.91170305
0.842 0.90973693
0.8588333333333333 0.9077905
0.8756666666666667 0.90584433
0.8925 0.9038986
0.9093333333333333 0.90195316
0.9261666666666667 0.9000081
0.943 0.89806336
0.9598333333333333 0.896119
0.9766666666666667 0.894175
0.9935 0.89223135
1.0103333333333333 0.89028805
1.0271666666666666 0.8883451
1.044 0.88640255
1.0608333333333333 0.8844603
1.0776666666666668 0.8825184
1.0945 0.8805769
1.1113333333333333 0.8786357
1.1281666666666668 0.8766949
1.145 0.8747544
1.1618333333333333 0.87281436
1.1786666666666668 0.87087464
1.1955 0.8689352
1.2123333333333333 0.8669962
1.2291666666666667 0.8650576
1.246 0.86311924
1.2628333333333333 0.8611813
1.2796666666666667 0.85924375
1.2965 0.85730654
1.3133333333333332 0.8553697
1.3301666666666667 0.8534332
1.347 0.85149705
1.3638333333333332 0.8495613
1.3806666666666667 0.8476259
1.3975 0.84569085
1.4143333333333334 0.8437562
1.4311666666666667 0.84182185
1.448 0.8398879
1.4648333333333334 0.83795434
1.4816666666666667 0.8360211
1.4985 0.83408827
1.5153333333333334 0.83215576
1.5321666666666667 0.8302237
1.549 0.82829195
1.5658333333333334 0.8263605
1.5826666666666667 0.8244295
1.5995 0.8224989
1.6163333333333334 0.8205686
1.6331666666666667 0.81863874
1.65 0.8167092
1.667 0.8147609
1.6838333333333333 0.8128321
1.7006666666666668 0.8109037
1.7175 0.8089757
1.7343333333333333 0.807048
1.7511666666666668 0.8051207
1.768 0.8031938
1.7848333333333333 0.80126727
1.8016666666666667 0.7993411
1.8185 0.79741526
1.8353333333333333 0.79548985
1.8521666666666667 0.7935648
1.869 0.7916401
1.8858333333333333 0.7897158
1.9026666666666667 0.7877919
1.9195 0.78586835
1.9363333333333332 0.7839452
1.9531666666666667 0.7820224
1.97 0.7801
1.9868333333333332 0.778178
2.0036666666666667 0.7762563
2.0205 0.774335
2.037333333333333 0.77241415
2.0541666666666667 0.7704936
2.071 0.7685735
2.087833333333333 0.7666538
2.1046666666666667 0.7647344
2.1215 0.7628154
2.138333333333333 0.7608968
2.1551666666666667 0.7589786
2.172 0.75706077
2.188833333333333 0.75514334
2.2056666666666667 0.7532263
2.2225 0.7513096
2.239333333333333 0.7493933
2.2561666666666667 0.7474774
2.273 0.7455619
2.289833333333333 0.74364674
2.3066666666666666 0.741732
2.3235 0.7398177
2.340333333333333 0.7379037
2.3571666666666666 0.73599017
2.374 0.734077
2.390833333333333 0.73216414
2.4076666666666666 0.7302517
2.4245 0.72833973
2.441333333333333 0.72642815
2.4581666666666666 0.7245169
2.475 0.72260606
2.492 0.7206767
2.5088333333333335 0.7187667
2.5256666666666665 0.716857
2.5425 0.71494776
2.5593333333333335 0.7130389
2.5761666666666665 0.71113044
2.593 0.7092224
2.6098333333333334 0.70731467
2.6266666666666665 0.70540744
2.6435 0.70350057
2.6603333333333334 0.70159405
2.6771666666666665 0.69968796
2.694 0.6977823
2.7108333333333334 0.695877
2.7276666666666665 0.6939721
2.7445 0.6920677
2.7613333333333334 0.69016355
2.7781666666666665 0.6882599
2.795 0.6863566
2.8118333333333334 0.6844537
2.828666666666667 0.68255126
2.8455 0.6806492
2.8623333333333334 0.67874753
2.879166666666667 0.67684627
2.896 0.6749454
2.9128333333333334 0.673045
2.929666666666667 0.6711449
2.9465 0.6692453
2.9633333333333334 0.66734606
2.980166666666667 0.66544724
2.997 0.6635488
3.0138333333333334 0.6616508
3.030666666666667 0.6597532
3.0475 0.657856
3.0643333333333334 0.65595925
3.081166666666667 0.65406287
3.098 0.6521669
3.1148333333333333 0.65027136
3.131666666666667 0.6483762
3.1485 0.6464815
3.1653333333333333 0.64458716
3.182166666666667 0.6426933
3.199 0.6407998
3.2158333333333333 0.6389067
3.232666666666667 0.6370141
3.2495 0.6351218
3.2663333333333333 0.63323003
3.283166666666667 0.6313386
3.3 0.62944764
3.317 0.6275383
3.333833333333333 0.6256482
3.3506666666666667 0.6237585
3.3675 0.62186915
3.384333333333333 0.6199803
3.4011666666666667 0.6180918
3.418 0.6162037
3.434833333333333 0.6143161
3.4516666666666667 0.6124289
3.4685 0.6105421
3.485333333333333 0.6086558
3.5021666666666667 0.60676986
3.519 0.6048843
3.535833333333333 0.60299927
3.5526666666666666 0.6011146
3.5695 0.59923035
3.586333333333333 0.59734654
3.6031666666666666 0.59546316
3.62 0.5935802
3.636833333333333 0.5916977
3.6536666666666666 0.58981556
3.6705 0.5879339
3.687333333333333 0.58605266
3.7041666666666666 0.58417183
3.721 0.5822915
3.737833333333333 0.5804115
3.7546666666666666 0.578532
3.7715 0.5766529
3.7883333333333336 0.57477427
3.8051666666666666 0.57289606
3.822 0.5710183
3.8388333333333335 0.5691409
3.8556666666666666 0.56726396
3.8725 0.5653875
3.8893333333333335 0.56351143
3.9061666666666666 0.56163585
3.923 0.5597607
3.9398333333333335 0.55788594
3.9566666666666666 0.5560116
3.9735 0.55413777
3.9903333333333335 0.5522644
4.0071666666666665 0.5503914
4.024 0.54851884
4.0408333333333335 0.5466468
4.057666666666667 0.5447751
4.0745 0.5429039
4.091333333333333 0.54103315
4.1081666666666665 0.5391628
4.125 0.5372929
4.1418333333333335 0.53542346
4.158833333333333 0.533536
4.175666666666666 0.5316675
4.1925 0.52979934
4.209333333333333 0.5279317
4.226166666666667 0.5260645
4.243 0.52419776
4.259833333333333 0.5223315
4.276666666666666 0.5204656
4.2935 0.51860017
4.310333333333333 0.51673526
4.327166666666667 0.51487076
4.344 0.5130067
4.360833333333333 0.5111431
4.377666666666666 0.5092799
4.3945 0.50741726
4.411333333333333 0.505555
4.428166666666667 0.5036932
4.445 0.5018319
4.461833333333334 0.499971
4.478666666666666 0.4981106
4.4955 0.49625063
4.512333333333333 0.4943911
4.529166666666667 0.49253207
4.546 0.49067348
4.562833333333334 0.48881537
4.579666666666666 0.4869577
4.5965 0.48510048
4.613333333333333 0.48324373
4.630166666666667 0.48138747
4.647 0.47953165
4.663833333333334 0.47767627
4.680666666666666 0.47582138
4.6975 0.47396696
4.714333333333333 0.47211298
4.731166666666667 0.4702595
4.748 0.46840644
4.764833333333334 0.46655387
4.781666666666666 0.46470177
4.7985 0.46285012
4.815333333333333 0.46099895
4.832166666666667 0.45914826
4.849 0.45729804
4.865833333333334 0.45544827
4.882666666666666 0.453599
4.8995 0.4517502
4.916333333333333 0.44990185
4.933166666666667 0.44805396
4.95 0.44620657
4.966833333333334 0.44435966
4.983833333333333 0.44249493
5.000666666666667 0.44064894
5.0175 0.43880346
5.0343333333333335 0.43695843
5.051166666666667 0.4351139
5.068 0.43326986
5.084833333333333 0.43142626
5.101666666666667 0.42958316
5.1185 0.42774054
5.1353333333333335 0.4258984
5.152166666666667 0.42405674
5.169 0.42221555
5.185833333333333 0.42037484
5.2026666666666666 0.41853464
5.2195 0.4166949
5.2363333333333335 0.41485566
5.253166666666667 0.4130169
5.27 0.41117862
5.286833333333333 0.40934083
5.3036666666666665 0.40750352
5.3205 0.4056667
5.3373333333333335 0.40383038
5.354166666666667 0.40199453
5.371 0.40015918
5.387833333333333 0.39832434
5.4046666666666665 0.39648995
5.4215 0.3946561
5.4383333333333335 0.39282268
5.455166666666667 0.3909898
5.472 0.3891574
5.488833333333333 0.3873255
5.5056666666666665 0.38549408
5.5225 0.38366318
5.539333333333333 0.38183275
5.556166666666667 0.38000283
5.573 0.3781734
5.589833333333333 0.37634447
5.6066666666666665 0.37451604
5.6235 0.3726881
5.640333333333333 0.3708607
5.657166666666667 0.36903375
5.674 0.36720732
5.690833333333333 0.36538142
5.707666666666666 0.363556
5.7245 0.36173105
5.741333333333333 0.35990664
5.758166666666667 0.35808274
5.775 0.35625935
5.791833333333333 0.35443643
5.808833333333333 0.352596
5.825666666666667 0.35077414
5.8425 0.34895277
5.859333333333334 0.3471319
5.876166666666666 0.34531155
5.893 0.3434917
5.909833333333333 0.3416724
5.926666666666667 0.33985355
5.9435 0.33803526
5.960333333333334 0.33621746
5.977166666666666 0.33440018
5.994 0.33258343
6.010833333333333 0.33076718
6.027666666666667 0.32895145
6.0445 0.32713622
6.061333333333334 0.32532153
6.078166666666666 0.32350734
6.095 0.3216937
6.111833333333333 0.31988055
6.128666666666667 0.31806794
6.1455 0.31625584
6.162333333333334 0.31444424
6.179166666666666 0.3126332
6.196 0.31082267
6.212833333333333 0.30901265
6.229666666666667 0.30720317
6.2465 0.3053942
6.263333333333334 0.30358577
6.280166666666666 0.30177787
6.297 0.29997048
6.313833333333333 0.29816362
6.330666666666667 0.2963573
6.3475 0.29455152
6.364333333333334 0.29274625
6.381166666666667 0.29094154
6.398 0.28913733
6.414833333333333 0.28733367
6.431666666666667 0.28553054
6.4485 0.2837279
6.465333333333334 0.28192586
6.482166666666667 0.28012434
6.499 0.27832335
6.515833333333333 0.27652287
6.532666666666667 0.27472296
6.5495 0.2729236
6.566333333333334 0.27112475
6.583166666666667 0.26932645
6.6 0.26752868
6.616833333333333 0.26573148
6.6338333333333335 0.263917
6.650666666666667 0.26212087
6.6675 0.2603253
6.684333333333333 0.25853026
6.7011666666666665 0.25673577
6.718 0.25494182
6.7348333333333334 0.25314844
6.751666666666667 0.25135556
6.7685 0.24956326
6.785333333333333 0.2477715
6.8021666666666665 0.24598031
6.819 0.24418965
6.835833333333333 0.24239954
6.852666666666667 0.24060999
6.8695 0.238821
6.886333333333333 0.23703255
6.9031666666666665 0.23524466
6.92 0.23345733
6.936833333333333 0.23167054
6.953666666666667 0.22988433
6.9705 0.22809866
6.987333333333333 0.22631356
7.004166666666666 0.22452901
7.021 0.22274502
7.037833333333333 0.2209616
7.054666666666667 0.21917874
7.0715 0.21739642
7.088333333333333 0.21561469
7.105166666666666 0.21383351
7.122 0.21205291
7.138833333333333 0.21027286
7.155666666666667 0.20849338
7.1725 0.20671447
7.189333333333333 0.20493613
7.206166666666666 0.20315835
7.223 0.20138115
7.239833333333333 0.19960451
7.256666666666667 0.19782846
7.2735 0.19605295
7.290333333333334 0.19427805
7.307166666666666 0.19250369
7.324 0.19072992
7.340833333333333 0.18895672
7.357666666666667 0.18718411
7.3745 0.18541206
7.391333333333334 0.1836406
7.408166666666666 0.18186972
7.425 0.1800994
7.441833333333333 0.17832968
7.458666666666667 0.17656054
7.475666666666666 0.17477445
7.4925 0.17300647
7.509333333333333 0.1712391
7.526166666666667 0.16947228
7.543 0.16770606
7.559833333333334 0.16594042
7.576666666666667 0.16417536
7.5935 0.1624109
7.610333333333333 0.16064703
7.627166666666667 0.15888374
7.644 0.15712105
7.660833333333334 0.15535894
7.677666666666667 0.15359743
7.6945 0.1518365
7.711333333333333 0.15007618
7.728166666666667 0.14831644
7.745 0.1465573
7.761833333333334 0.14479877
7.778666666666667 0.14304082
7.7955 0.14128347
7.812333333333333 0.13952672
7.829166666666667 0.13777058
7.846 0.13601503
7.862833333333334 0.13426007
7.879666666666667 0.13250573
7.8965 0.130752
7.913333333333333 0.12899885
7.930166666666667 0.12724632
7.947 0.12549439
7.9638333333333335 0.123743065
7.980666666666667 0.12199235
7.9975 0.12024224
8.014333333333333 0.118492745
8.031166666666667 0.116743855
8.048 0.11499558
8.064833333333333 0.11324791
8.081666666666667 0.11150085
8.0985 0.10975441
8.115333333333334 0.108008586
8.132166666666667 0.10626338
8.149 0.10451878
8.165833333333333 0.1027748
8.182666666666666 0.10103144
8.1995 0.099288695
8.216333333333333 0.09754658
8.233166666666667 0.09580507
8.25 0.09406419
8.266833333333333 0.09232394
8.283666666666667 0.0905843
8.300666666666666 0.08882807
8.3175 0.08708969
8.334333333333333 0.08535194
8.351166666666666 0.08361481
8.368 0.081878304
8.384833333333333 0.08014244
8.401666666666667 0.07840719
8.4185 0.076672584
8.435333333333332 0.0749386
8.452166666666667 0.073205255
8.469 0.07147254
8.485833333333334 0.06974046
8.502666666666666 0.06800901
8.5195 0.066278204
8.536333333333333 0.06454803
8.553166666666666 0.06281849
8.57 0.061089594
8.586833333333333 0.05936134
8.603666666666667 0.05763372
8.6205 0.055906747
8.637333333333334 0.054180413
8.654166666666667 0.052454725
8.671 0.050729677
8.687833333333334 0.049005277
8.704666666666666 0.047281522
8.7215 0.045558415
8.738333333333333 0.043835957
8.755166666666666 0.042114146
8.772 0.040392987
8.788833333333333 0.038672477
8.805666666666667 0.036952622
8.8225 0.035233416
8.839333333333334 0.033514865
8.856166666666667 0.03179697
8.873 0.030079728
8.889833333333334 0.028363144
8.906666666666666 0.026647218
8.9235 0.02493195
8.940333333333333 0.02321734
8.957166666666666 0.021503393
8.974 0.019790106
8.990833333333333 0.018077482
9.007666666666667 0.01636552
9.0245 0.014654224
9.041333333333334 0.012943592
9.058166666666667 0.011233627
9.075 0.009524329
9.091833333333334 0.007815699
9.108666666666666 0.0061077382
9.125666666666667 0.004383547
9.1425 0.0026769347
9.159333333333333 9.7099406E-4
9.169 -8.35078E-6
9.169166666666667 -2.5233994E-5
9.169333333333332 -4.2117037E-5
9.1695 -5.8999914E-5
9.169666666666666 -7.588262E-5
9.169833333333333 -9.2765156E-5
9.17 -1.09647524E-4
9.170166666666667 -1.2652972E-4

View File

@@ -0,0 +1,553 @@
1.6666666666666666E-4 0.15590967
0.017 0.3173035
0.03383333333333333 0.8572065
0.050666666666666665 4.2999444
0.0675 10.649332
0.08433333333333333 15.136699
0.10116666666666667 15.408284
0.118 15.580496
0.13483333333333333 15.503048
0.15166666666666667 15.254982
0.1685 14.299928
0.18533333333333332 13.632524
0.20216666666666666 14.56705
0.219 15.2087965
0.23583333333333334 14.294979
0.25266666666666665 15.311296
0.2695 15.30135
0.28633333333333333 15.291403
0.30316666666666664 15.281458
0.32 15.271514
0.3368333333333333 15.261572
0.3536666666666667 15.25163
0.3705 15.24169
0.3873333333333333 15.23175
0.4041666666666667 15.221811
0.421 15.211874
0.43783333333333335 15.201938
0.45466666666666666 15.192003
0.4715 15.182069
0.48833333333333334 15.172136
0.5051666666666667 15.162205
0.522 15.152274
0.5388333333333334 15.142344
0.5556666666666666 15.132417
0.5725 15.122489
0.5893333333333334 15.112563
0.6061666666666666 15.102638
0.623 15.092714
0.6398333333333334 15.082791
0.6566666666666666 15.072869
0.6735 15.062949
0.6903333333333334 15.05303
0.7071666666666667 15.043112
0.724 15.033195
0.7408333333333333 15.023278
0.7576666666666667 15.013363
0.7745 15.003449
0.7913333333333333 14.993537
0.8081666666666667 14.983625
0.825 14.973715
0.842 14.963707
0.8588333333333333 14.953798
0.8756666666666667 14.943892
0.8925 14.933986
0.9093333333333333 14.924081
0.9261666666666667 14.914177
0.943 14.904274
0.9598333333333333 14.894372
0.9766666666666667 14.884472
0.9935 14.874573
1.0103333333333333 14.864675
1.0271666666666666 14.854777
1.044 14.844881
1.0608333333333333 14.834986
1.0776666666666668 14.825092
1.0945 14.8152
1.1113333333333333 14.805308
1.1281666666666668 14.795418
1.145 14.785528
1.1618333333333333 14.77564
1.1786666666666668 14.765753
1.1955 14.755867
1.2123333333333333 14.745982
1.2291666666666667 14.736098
1.246 14.726215
1.2628333333333333 14.716333
1.2796666666666667 14.706453
1.2965 14.696574
1.3133333333333332 14.686696
1.3301666666666667 14.676819
1.347 14.666943
1.3638333333333332 14.657067
1.3806666666666667 14.647194
1.3975 14.637321
1.4143333333333334 14.62745
1.4311666666666667 14.617579
1.448 14.60771
1.4648333333333334 14.597842
1.4816666666666667 14.587975
1.4985 14.578109
1.5153333333333334 14.568244
1.5321666666666667 14.55838
1.549 14.548517
1.5658333333333334 14.538656
1.5826666666666667 14.528795
1.5995 14.518936
1.6163333333333334 14.509078
1.6331666666666667 14.499221
1.65 14.489365
1.667 14.479413
1.6838333333333333 14.469559
1.7006666666666668 14.459706
1.7175 14.449855
1.7343333333333333 14.440004
1.7511666666666668 14.430155
1.768 14.420307
1.7848333333333333 14.4104595
1.8016666666666667 14.400614
1.8185 14.390769
1.8353333333333333 14.380925
1.8521666666666667 14.371083
1.869 14.361241
1.8858333333333333 14.351401
1.9026666666666667 14.341561
1.9195 14.331723
1.9363333333333332 14.321886
1.9531666666666667 14.312051
1.97 14.302216
1.9868333333333332 14.292382
2.0036666666666667 14.28255
2.0205 14.272718
2.037333333333333 14.262888
2.0541666666666667 14.253058
2.071 14.243231
2.087833333333333 14.233403
2.1046666666666667 14.2235775
2.1215 14.213753
2.138333333333333 14.203929
2.1551666666666667 14.194106
2.172 14.184285
2.188833333333333 14.174464
2.2056666666666667 14.164645
2.2225 14.154827
2.239333333333333 14.14501
2.2561666666666667 14.135195
2.273 14.12538
2.289833333333333 14.115566
2.3066666666666666 14.105754
2.3235 14.0959425
2.340333333333333 14.086132
2.3571666666666666 14.076323
2.374 14.066515
2.390833333333333 14.056707
2.4076666666666666 14.046902
2.4245 14.037097
2.441333333333333 14.027293
2.4581666666666666 14.01749
2.475 14.007689
2.492 13.997792
2.5088333333333335 13.987993
2.5256666666666665 13.978195
2.5425 13.968398
2.5593333333333335 13.958602
2.5761666666666665 13.948808
2.593 13.9390135
2.6098333333333334 13.929221
2.6266666666666665 13.91943
2.6435 13.909639
2.6603333333333334 13.899851
2.6771666666666665 13.890062
2.694 13.880276
2.7108333333333334 13.87049
2.7276666666666665 13.860705
2.7445 13.850922
2.7613333333333334 13.841139
2.7781666666666665 13.831358
2.795 13.821577
2.8118333333333334 13.811798
2.828666666666667 13.80202
2.8455 13.792243
2.8623333333333334 13.782468
2.879166666666667 13.772693
2.896 13.762919
2.9128333333333334 13.753147
2.929666666666667 13.743376
2.9465 13.733605
2.9633333333333334 13.723836
2.980166666666667 13.714068
2.997 13.704301
3.0138333333333334 13.694535
3.030666666666667 13.684771
3.0475 13.675007
3.0643333333333334 13.665245
3.081166666666667 13.655483
3.098 13.645723
3.1148333333333333 13.635964
3.131666666666667 13.626206
3.1485 13.616449
3.1653333333333333 13.606693
3.182166666666667 13.596939
3.199 13.587186
3.2158333333333333 13.577433
3.232666666666667 13.567682
3.2495 13.557932
3.2663333333333333 13.5481825
3.283166666666667 13.538435
3.3 13.5286875
3.317 13.518846
3.333833333333333 13.509101
3.3506666666666667 13.499357
3.3675 13.489615
3.384333333333333 13.479874
3.4011666666666667 13.470134
3.418 13.460395
3.434833333333333 13.450657
3.4516666666666667 13.44092
3.4685 13.431184
3.485333333333333 13.42145
3.5021666666666667 13.411716
3.519 13.401983
3.535833333333333 13.392252
3.5526666666666666 13.382523
3.5695 13.372793
3.586333333333333 13.363066
3.6031666666666666 13.353338
3.62 13.343613
3.636833333333333 13.333888
3.6536666666666666 13.324164
3.6705 13.314443
3.687333333333333 13.304721
3.7041666666666666 13.295001
3.721 13.285282
3.737833333333333 13.275564
3.7546666666666666 13.265847
3.7715 13.256132
3.7883333333333336 13.246417
3.8051666666666666 13.236704
3.822 13.226992
3.8388333333333335 13.21728
3.8556666666666666 13.20757
3.8725 13.197861
3.8893333333333335 13.188153
3.9061666666666666 13.178447
3.923 13.168741
3.9398333333333335 13.159037
3.9566666666666666 13.149333
3.9735 13.13963
3.9903333333333335 13.12993
4.0071666666666665 13.12023
4.024 13.11053
4.0408333333333335 13.100833
4.057666666666667 13.091136
4.0745 13.08144
4.091333333333333 13.071746
4.1081666666666665 13.062052
4.125 13.05236
4.1418333333333335 13.042668
4.158833333333333 13.032883
4.175666666666666 13.023193
4.1925 13.013506
4.209333333333333 13.003819
4.226166666666667 12.994134
4.243 12.984449
4.259833333333333 12.974766
4.276666666666666 12.965083
4.2935 12.955402
4.310333333333333 12.945723
4.327166666666667 12.936044
4.344 12.926366
4.360833333333333 12.916689
4.377666666666666 12.907013
4.3945 12.897339
4.411333333333333 12.887666
4.428166666666667 12.877994
4.445 12.868322
4.461833333333334 12.858652
4.478666666666666 12.848984
4.4955 12.839315
4.512333333333333 12.829649
4.529166666666667 12.8199835
4.546 12.810319
4.562833333333334 12.800655
4.579666666666666 12.790994
4.5965 12.781332
4.613333333333333 12.771672
4.630166666666667 12.762013
4.647 12.752356
4.663833333333334 12.742699
4.680666666666666 12.733044
4.6975 12.723389
4.714333333333333 12.713736
4.731166666666667 12.704083
4.748 12.694432
4.764833333333334 12.684782
4.781666666666666 12.675134
4.7985 12.665485
4.815333333333333 12.655839
4.832166666666667 12.6461935
4.849 12.636549
4.865833333333334 12.626905
4.882666666666666 12.617264
4.8995 12.607622
4.916333333333333 12.597982
4.933166666666667 12.588344
4.95 12.578706
4.966833333333334 12.56907
4.983833333333333 12.559339
5.000666666666667 12.549705
5.0175 12.540071
5.0343333333333335 12.530438
5.051166666666667 12.520807
5.068 12.511178
5.084833333333333 12.501549
5.101666666666667 12.491921
5.1185 12.482295
5.1353333333333335 12.47267
5.152166666666667 12.463045
5.169 12.453422
5.185833333333333 12.443799
5.2026666666666666 12.434178
5.2195 12.424559
5.2363333333333335 12.41494
5.253166666666667 12.405322
5.27 12.395705
5.286833333333333 12.38609
5.3036666666666665 12.376475
5.3205 12.366862
5.3373333333333335 12.35725
5.354166666666667 12.347639
5.371 12.33803
5.387833333333333 12.328421
5.4046666666666665 12.318813
5.4215 12.309206
5.4383333333333335 12.299601
5.455166666666667 12.289997
5.472 12.280394
5.488833333333333 12.270791
5.5056666666666665 12.26119
5.5225 12.251591
5.539333333333333 12.241992
5.556166666666667 12.232394
5.573 12.222797
5.589833333333333 12.213202
5.6066666666666665 12.203608
5.6235 12.194015
5.640333333333333 12.1844225
5.657166666666667 12.174831
5.674 12.165242
5.690833333333333 12.155653
5.707666666666666 12.146066
5.7245 12.136478
5.741333333333333 12.126893
5.758166666666667 12.11731
5.775 12.107726
5.791833333333333 12.098144
5.808833333333333 12.088469
5.825666666666667 12.078888
5.8425 12.069309
5.859333333333334 12.059732
5.876166666666666 12.050156
5.893 12.04058
5.909833333333333 12.031006
5.926666666666667 12.021433
5.9435 12.011861
5.960333333333334 12.00229
5.977166666666666 11.99272
5.994 11.983151
6.010833333333333 11.973584
6.027666666666667 11.964017
6.0445 11.954452
6.061333333333334 11.944888
6.078166666666666 11.935325
6.095 11.925762
6.111833333333333 11.916202
6.128666666666667 11.906642
6.1455 11.897083
6.162333333333334 11.887526
6.179166666666666 11.877969
6.196 11.868414
6.212833333333333 11.85886
6.229666666666667 11.849306
6.2465 11.839754
6.263333333333334 11.830204
6.280166666666666 11.820654
6.297 11.811106
6.313833333333333 11.801558
6.330666666666667 11.792011
6.3475 11.782466
6.364333333333334 11.772922
6.381166666666667 11.763379
6.398 11.753837
6.414833333333333 11.744296
6.431666666666667 11.734756
6.4485 11.725218
6.465333333333334 11.71568
6.482166666666667 11.706143
6.499 11.696609
6.515833333333333 11.687074
6.532666666666667 11.677541
6.5495 11.668009
6.566333333333334 11.658478
6.583166666666667 11.648949
6.6 11.63942
6.616833333333333 11.629892
6.6338333333333335 11.620272
6.650666666666667 11.610746
6.6675 11.601222
6.684333333333333 11.5917
6.7011666666666665 11.582177
6.718 11.572657
6.7348333333333334 11.563137
6.751666666666667 11.553618
6.7685 11.544101
6.785333333333333 11.534584
6.8021666666666665 11.525069
6.819 11.515555
6.835833333333333 11.506042
6.852666666666667 11.49653
6.8695 11.48702
6.886333333333333 11.4775095
6.9031666666666665 11.468001
6.92 11.458493
6.936833333333333 11.448987
6.953666666666667 11.439482
6.9705 11.429977
6.987333333333333 11.420475
7.004166666666666 11.410973
7.021 11.401472
7.037833333333333 11.391973
7.054666666666667 11.382474
7.0715 11.372976
7.088333333333333 11.363481
7.105166666666666 11.353985
7.122 11.344491
7.138833333333333 11.334998
7.155666666666667 11.325506
7.1725 11.316015
7.189333333333333 11.306525
7.206166666666666 11.297037
7.223 11.28755
7.239833333333333 11.278064
7.256666666666667 11.268579
7.2735 11.259094
7.290333333333334 11.249611
7.307166666666666 11.240129
7.324 11.230649
7.340833333333333 11.221169
7.357666666666667 11.211691
7.3745 11.202213
7.391333333333334 11.192737
7.408166666666666 11.183262
7.425 11.173788
7.441833333333333 11.164314
7.458666666666667 11.154842
7.475666666666666 11.145278
7.4925 11.135809
7.509333333333333 11.12634
7.526166666666667 11.116873
7.543 11.107407
7.559833333333334 11.097941
7.576666666666667 11.088477
7.5935 11.079015
7.610333333333333 11.069552
7.627166666666667 11.060092
7.644 11.050632
7.660833333333334 11.041174
7.677666666666667 11.031716
7.6945 11.022261
7.711333333333333 11.012805
7.728166666666667 11.003351
7.745 10.993898
7.761833333333334 10.984447
7.778666666666667 10.974996
7.7955 10.965547
7.812333333333333 10.956098
7.829166666666667 10.9466505
7.846 10.937204
7.862833333333334 10.927759
7.879666666666667 10.918315
7.8965 10.908873
7.913333333333333 10.89943
7.930166666666667 10.88999
7.947 10.88055
7.9638333333333335 10.871112
7.980666666666667 10.861675
7.9975 10.852239
8.014333333333333 10.842804
8.031166666666667 10.833369
8.048 10.823936
8.064833333333333 10.814505
8.081666666666667 10.805075
8.0985 10.795645
8.115333333333334 10.786217
8.132166666666667 10.776789
8.149 10.767363
8.165833333333333 10.757937
8.182666666666666 10.748514
8.1995 10.739091
8.216333333333333 10.72967
8.233166666666667 10.720249
8.25 10.710829
8.266833333333333 10.701411
8.283666666666667 10.691994
8.300666666666666 10.682485
8.3175 10.673069
8.334333333333333 10.663655
8.351166666666666 10.6542425
8.368 10.644831
8.384833333333333 10.63542
8.401666666666667 10.626011
8.4185 10.616602
8.435333333333332 10.607195
8.452166666666667 10.597789
8.469 10.588384
8.485833333333334 10.57898
8.502666666666666 10.569577
8.5195 10.560176
8.536333333333333 10.550775
8.553166666666666 10.541375
8.57 10.531978
8.586833333333333 10.52258
8.603666666666667 10.513184
8.6205 10.503789
8.637333333333334 10.494395
8.654166666666667 10.4850025
8.671 10.475611
8.687833333333334 10.46622
8.704666666666666 10.456831
8.7215 10.447442
8.738333333333333 10.438055
8.755166666666666 10.428669
8.772 10.419284
8.788833333333333 10.4099
8.805666666666667 10.400517
8.8225 10.391136
8.839333333333334 10.381755
8.856166666666667 10.3723755
8.873 10.362997
8.889833333333334 10.353621
8.906666666666666 10.344244
8.9235 10.334869
8.940333333333333 10.325496
8.957166666666666 10.316123
8.974 10.306751
8.990833333333333 10.29738
9.007666666666667 10.288012
9.0245 10.278643
9.041333333333334 10.269276
9.058166666666667 10.25991
9.075 10.250545
9.091833333333334 10.241181
9.108666666666666 10.231818
9.125666666666667 10.222363
9.1425 10.213003
9.159333333333333 10.203644
9.169 10.19827
9.169166666666667 10.198177
9.169333333333332 10.198085
9.1695 10.197992
9.169666666666666 10.197899
9.169833333333333 10.197806
9.17 10.197714
9.170166666666667 10.197621

View File

@@ -0,0 +1,144 @@
import numpy as np
import matplotlib.pyplot as plt
'''
This file gives the trace for 2 data sets (Nominally measured and simulated)
but can be modified to do 1 or more if needed.
It will automatically scale from -180 to 180 for a 2-Stroke
It needs .txt files copied from the data of GT-Power with the format of:
title line
data CAD
data CAD
. .
. .
. .
Other needed info: Max y value for the y axis
**Will need to adjust colors, line type, etc.**
'''
def get_data(filename):
file = open(filename)
title = file.readline()
lines = file.readlines()
x = []
y = []
x_shift = []
y_shift = []
for line in lines:
line.strip()
data = line.split()
if float(data[0])<=180:
x.append(float(data[0]))
y.append(float(data[1]))
else:
x_shift.append(float(data[0])-360)
y_shift.append(float(data[1]))
return x_shift+x, y_shift+y
x_meas, y_meas = get_data('Python/Plotting/Base/Measured_P.txt') #Files go here
x_sim, y_sim = get_data("Python/Plotting/Base/Simulated_P.txt")
y_max_data = 36
################################# BASIC PLOT CODE #################################
# Basic Styling
plt.rcParams.update({
'font.family': 'Courier New', # monospace font
'font.size': 20, # Fonts
'axes.titlesize': 20, # |
'axes.labelsize': 20, # V
'xtick.labelsize': 15,
'ytick.labelsize': 15,
'legend.fontsize': 15,
'figure.titlesize': 20,
'figure.figsize': [10,5] # Figure Size
})
# Figure Setup
fig, ax = plt.subplots()
title = 'Cylinder Pressure Trace' # Title
xlab = '' # X Label
ylab = 'Pressure [Bar]' # Y Label
ax.set_xlabel(xlab)
ax.set_ylabel(ylab)
ax.set_title(title, pad = 20) #pad controls distance to plot
ax.spines['top'].set_visible(False) # Controls non axis borders
ax.spines['right'].set_visible(False)
x_min = -180 # Axis Limits and Ticks
x_max = 180
x_step_maj = 1 #steps not division
x_step_min = 1
y_min = 0
y_max = y_max_data
y_step_maj = 5
y_step_min = 1
ax.set_xlim(x_min,x_max) # X limits
ax.set_xticks([-180,-90,0,90,180],['BDC\n-180°','Intake/Compression','TDC\n','Exhaust/Expansion','BDC\n180°']) # X Major Ticks
ax.set_xticks([-180,-90,0,90,180], minor=True) # X Minor Ticks
ax.set_ylim(y_min,y_max) # Y limits
ax.set_yticks(np.arange(y_min,y_max,y_step_maj),tickpad = 10) # Y Major Ticks
# ax.set_yticks(np.arange(y_min,y_max,y_step_min),minor=True) # Y Minor Ticks
ax.grid(True, which='major',alpha=0.5) # Turn On Major Grid
ax.grid(True, which='minor',alpha=0.2) # Turn on Minor Grid
# alpha controls transparency
###################### Single Line ######################
'''
# x = []
# y = []
# ax.plot(x,y,color='black',linestyle='-',linewidth='1')
# # Basic Line Styles: -, --, :, -.
# # Basic Colors: red, blue, green, purple, cyan, magenta, black, brown, etc
# # Can Specify Hex code for colors
# ax.scatter(x,y,color='black',marker='o',size=20)
# # Many Markers: circle-'o', square-'s', triangle-'^',star-'*', x-'x'
# plt.show()
'''
###################### Multi Line ######################
x = [x_sim,x_meas,[0,0]] # List of Lists
y = [y_sim,y_meas,[0,36]] # List of Lists
#### Lists must be equal length ###
dl = ['Simulated','Measured',''] # Data Labels (list)
lc = ['black','black','black'] # Line Color |
ls = ['-','--','-'] # Line Style |
lw = [2,2,1] # Line Width V
a = [1,1,0.8] # Transparency
s = [] # Marker Size, 20 is default
m = [] # Marker Type, 'o' is default
# Use color-hex.com for color pallets
# Common ones: Shades of Teal, Ocean Breezes By,Ppt Cv
for i in range(len(x)):
ax.plot(x[i],y[i],label=dl[i],color=lc[i],linestyle=ls[i],linewidth=lw[i], alpha=a[i])
#ax.scatter(x[i],y[i],label=dl[i],color=lc[i],marker=m[i],size=s[i])
ax.legend(loc='center', bbox_to_anchor=(0.8,0.8), ncol=1, frameon=True,edgecolor='white',framealpha=1, labelspacing=0.2,
columnspacing=0.75,handlelength=0.9, handletextpad=0.3)
# anchor loc is based on the plot area, 0.5 is half the width, 1.01 is just above the top
# labelspacing is for vertical spacing, column is for horizontal, handel is for line length, textpad is for handl eto text
plt.tight_layout()
plt.show()

View File

@@ -0,0 +1,144 @@
import numpy as np
import matplotlib.pyplot as plt
'''
This file gives the pressure trace for 2 traces (Nominally measured and simulated)
but can be modified to do 1 or more if needed.
It will automatically scale from -180 to 180 for a 2-Stroke
It needs .txt files copied from the data of GT-Power with the format of:
title line
pressure CAD
pressure CAD
. .
. .
. .
Other needed info: Max y value for the y axis
**Will need to adjust colors, line type, etc.**
'''
def get_data(filename):
file = open(filename)
title = file.readline()
lines = file.readlines()
x = []
y = []
x_shift = []
y_shift = []
for line in lines:
line.strip()
data = line.split()
if float(data[0])<=180:
x.append(float(data[0]))
y.append(float(data[1]))
else:
x_shift.append(float(data[0])-360)
y_shift.append(float(data[1]))
return x_shift+x, y_shift+y
x_meas, y_meas = get_data('Python/Plotting/Base/Measured_P.txt') #Files go here
x_sim, y_sim = get_data("Python/Plotting/Base/Simulated_P.txt")
y_max_data = 36
################################# BASIC PLOT CODE #################################
# Basic Styling
plt.rcParams.update({
'font.family': 'Courier New', # monospace font
'font.size': 20, # Fonts
'axes.titlesize': 20, # |
'axes.labelsize': 15, # V
'xtick.labelsize': 15,
'ytick.labelsize': 15,
'legend.fontsize': 15,
'figure.titlesize': 20,
'figure.figsize': [10,5] # Figure Size
})
# Figure Setup
fig, ax = plt.subplots()
title = 'Cylinder Pressure Trace' # Title
xlab = 'Crank Angle [degrees]' # X Label
ylab = 'Pressure [Bar]' # Y Label
ax.set_xlabel(xlab)
ax.set_ylabel(ylab)
ax.set_title(title, pad = 20) #pad controls distance to plot
ax.spines['top'].set_visible(False) # Controls non axis borders
ax.spines['right'].set_visible(False)
x_min = -180 # Axis Limits and Ticks
x_max = 180
x_step_maj = 1 #steps not division
x_step_min = 1
y_min = 0
y_max = y_max_data
y_step_maj = 5
y_step_min = 1
ax.set_xlim(x_min,x_max) # X limits
ax.set_xticks([-180,-90,0,90,180],['BDC\n-180°','Intake/Compression','TDC\n','Exhaust/Expansion','BDC\n180°']) # X Major Ticks
# ax.set_xticks([-180,-90,0,90,180], minor=True) # X Minor Ticks
ax.set_ylim(y_min,y_max) # Y limits
ax.set_yticks(np.arange(y_min,y_max,y_step_maj),tickpad = 10) # Y Major Ticks
# ax.set_yticks(np.arange(y_min,y_max,y_step_min),minor=True) # Y Minor Ticks
ax.grid(True, which='major',alpha=0.5) # Turn On Major Grid
ax.grid(True, which='minor',alpha=0.2) # Turn on Minor Grid
# alpha controls transparency
###################### Single Line ######################
'''
# x = []
# y = []
# ax.plot(x,y,color='black',linestyle='-',linewidth='1')
# # Basic Line Styles: -, --, :, -.
# # Basic Colors: red, blue, green, purple, cyan, magenta, black, brown, etc
# # Can Specify Hex code for colors
# ax.scatter(x,y,color='black',marker='o',size=20)
# # Many Markers: circle-'o', square-'s', triangle-'^',star-'*', x-'x'
# plt.show()
'''
###################### Multi Line ######################
x = [x_sim,x_meas,[0,0]] # List of Lists
y = [y_sim,y_meas,[0,36]] # List of Lists
#### Lists must be equal length ###
dl = ['Simulated','Measured',''] # Data Labels (list)
lc = ['black','black','black'] # Line Color |
ls = ['-','--','-'] # Line Style |
lw = [2,2,1] # Line Width V
a = [1,1,0.8] # Transparency
s = [] # Marker Size, 20 is default
m = [] # Marker Type, 'o' is default
# Use color-hex.com for color pallets
# Common ones: Shades of Teal, Ocean Breezes By,Ppt Cv
for i in range(len(x)):
ax.plot(x[i],y[i],label=dl[i],color=lc[i],linestyle=ls[i],linewidth=lw[i], alpha=a[i])
#ax.scatter(x[i],y[i],label=dl[i],color=lc[i],marker=m[i],size=s[i])
ax.legend(loc='center', bbox_to_anchor=(0.8,0.8), ncol=1, frameon=True,edgecolor='white',framealpha=1, labelspacing=0.2,
columnspacing=0.75,handlelength=0.9, handletextpad=0.3)
# anchor loc is based on the plot area, 0.5 is half the width, 1.01 is just above the top
# labelspacing is for vertical spacing, column is for horizontal, handel is for line length, textpad is for handl eto text
plt.tight_layout()
plt.show()

View File

@@ -0,0 +1,144 @@
import numpy as np
import matplotlib.pyplot as plt
'''
This file gives the trace for 2 data sets (Nominally measured and simulated)
but can be modified to do 1 or more if needed.
It will automatically scale from -180 to 540 for a 4-Stroke
It needs .txt files copied from the data of GT-Power with the format of:
(no headers)
data CAD
data CAD
. .
. .
. .
Other needed info: Max y value for the y axis
**Will need to adjust colors, step scaling, line type, etc.**
'''
def get_data(filename):
file = open(filename)
# title = file.readline()
lines = file.readlines()
x = []
y = []
x_shift = []
y_shift = []
for line in lines:
line.strip()
data = line.split()
if float(data[0])<=540:
x.append(float(data[0]))
y.append(float(data[1]))
else:
x_shift.append(float(data[0])-720)
y_shift.append(float(data[1]))
return x_shift+x, y_shift+y
x1, y1 = get_data('Python/Plotting/Base/mass_atm.txt') #Files go here
x2, y2 = get_data("Python/Plotting/Base/mass_2bar.txt")
y_max_data = 1.8
################################# BASIC PLOT CODE #################################
# Basic Styling
plt.rcParams.update({
'font.family': 'Courier New', # monospace font
'font.size': 20, # Fonts
'axes.titlesize': 20, # |
'axes.labelsize': 20, # V
'xtick.labelsize': 15,
'ytick.labelsize': 15,
'legend.fontsize': 15,
'figure.titlesize': 20,
'figure.figsize': [10,5] # Figure Size
})
# Figure Setup
fig, ax = plt.subplots()
title = 'Trapped Mass' # Title
xlab = 'Crank Angle [degrees]' # X Label
ylab = 'Pressure [Bar]' # Y Label
# ax.set_xlabel(xlab)
ax.set_ylabel(ylab)
ax.set_title(title, pad = 20) #pad controls distance to plot
ax.spines['top'].set_visible(False) # Controls non axis borders
ax.spines['right'].set_visible(False)
x_min = -180 # Axis Limits and Ticks
x_max = 540
x_step_maj = 1 #steps not division
x_step_min = 1
y_min = 0
y_max = y_max_data
y_step_maj = 0.2
y_step_min = 0.1
ax.set_xlim(x_min,x_max) # X limits
ax.set_xticks([-180,-90,0,90,180,270,360,450,540],['BDC\n-180°','Compression','TDCF\n','Power','BDC\n180°','Exhaust','TDC\n360°','Intake','BDC\n540°']) # X Major Ticks
# ax.set_xticks([-180,-90,0,90,180], minor=True) # X Minor Ticks
ax.set_ylim(y_min,y_max) # Y limits
ax.set_yticks(np.arange(y_min,y_max,y_step_maj),tickpad = 10) # Y Major Ticks
# ax.set_yticks(np.arange(y_min,y_max,y_step_min),minor=True) # Y Minor Ticks
ax.grid(True, which='major',alpha=0.5) # Turn On Major Grid
ax.grid(True, which='minor',alpha=0.2) # Turn on Minor Grid
# alpha controls transparency
###################### Single Line ######################
'''
# x = []
# y = []
# ax.plot(x,y,color='black',linestyle='-',linewidth='1')
# # Basic Line Styles: -, --, :, -.
# # Basic Colors: red, blue, green, purple, cyan, magenta, black, brown, etc
# # Can Specify Hex code for colors
# ax.scatter(x,y,color='black',marker='o',size=20)
# # Many Markers: circle-'o', square-'s', triangle-'^',star-'*', x-'x'
# plt.show()
'''
###################### Multi Line ######################
x = [x1,x2,[0,0]] # List of Lists
y = [y1,y2,[0,y_max_data]] # List of Lists
#### Lists must be equal length ###
dl = ['No Boost','2 Bar Boost',''] # Data Labels (list)
lc = ['black','black','black'] # Line Color |
ls = ['-','--','-'] # Line Style |
lw = [2,2,1] # Line Width V
a = [1,1,0.8] # Transparency
s = [] # Marker Size, 20 is default
m = [] # Marker Type, 'o' is default
# Use color-hex.com for color pallets
# Common ones: Shades of Teal, Ocean Breezes By,Ppt Cv
for i in range(len(x)):
ax.plot(x[i],y[i],label=dl[i],color=lc[i],linestyle=ls[i],linewidth=lw[i], alpha=a[i])
#ax.scatter(x[i],y[i],label=dl[i],color=lc[i],marker=m[i],size=s[i])
ax.legend(loc='center', bbox_to_anchor=(0.8,0.8), ncol=1, frameon=True,edgecolor='white',framealpha=1, labelspacing=0.2,
columnspacing=0.75,handlelength=0.9, handletextpad=0.3)
# anchor loc is based on the plot area, 0.5 is half the width, 1.01 is just above the top
# labelspacing is for vertical spacing, column is for horizontal, handel is for line length, textpad is for handl eto text
plt.tight_layout()
plt.show()

View File

@@ -0,0 +1,143 @@
import numpy as np
import matplotlib.pyplot as plt
'''
This file gives the PV Diagram for 2 traces (Nominally measured and simulated)
but can be modified to do 1 or more if needed.
It needs .txt files copied from the data of GT-Power with the format of:
(no headers)
pressure volume fraction
pressure volume fraction
. .
. .
. .
Other needed info: Max y value for the y axis
**Will need to adjust how far out min/max lines go, as well as
colors, line type, etc.**
'''
def get_data(filename):
file = open(filename)
title = file.readline()
lines = file.readlines()
x = []
y = []
for line in lines:
line.strip()
data = line.split()
x.append(float(data[0]))
y.append(float(data[1]))
return x, y, round(min(x),3), round(max(y),2)
x_meas, y_meas, x_meas_min, y_meas_max = get_data('Python/Plotting/Base/Measured.txt') #Files here
x_sim, y_sim, x_sim_min, y_sim_max = get_data("Python/Plotting/Base/Simulated.txt")
x_min_data = min(x_meas_min, x_meas_min)
#print(min(x_meas),min(x_sim))
################################# BASIC PLOT CODE #################################
# Basic Styling
plt.rcParams.update({
'font.family': 'Courier New', # monospace font
'font.size': 20, # Fonts
'axes.titlesize': 30, # |
'axes.labelsize': 20, # V
'xtick.labelsize': 15,
'ytick.labelsize': 15,
'legend.fontsize': 20,
'figure.titlesize': 20,
'figure.figsize': [10,10] # Figure Size
})
# Figure Setup
fig, ax = plt.subplots()
title = 'PV Diagram' # Title
xlab = '% of Volume' # X Label
ylab = 'Cyinder Pressure [Bar]' # Y Label
ax.set_xlabel(xlab)
ax.set_ylabel(ylab, labelpad=0)
ax.set_title(title, pad = 0) #pad controls distance to plot
ax.spines['top'].set_visible(False) # Controls non axis borders
ax.spines['right'].set_visible(False)
# ax.set_xscale('log')
# ax.set_yscale('log')
x_min = 0 # Axis Limits and Ticks
x_max = 1.1
x_step_maj = 1 #steps not division
x_step_min = 1
y_min = 0
y_max = 25
y_step_maj = 25
y_step_min = 1
ax.set_xlim(x_min,x_max) # X limits
ax.set_xticks([x_min_data,1]) # X Major Ticks
# ax.set_xticks(np.arange(x_min,x_max,x_step_min), minor=True) # X Minor Ticks
ax.set_ylim(y_min,y_max) # Y limits
ax.set_yticks([y_meas_max,y_sim_max]) # Y Major Ticks
# ax.set_yticks(np.arange(y_min,y_max,y_step_min),minor=True) # Y Minor Ticks
# ax.grid(True, which='major',alpha=1, lw=1, ls='--', color='black') # Turn On Major Grid
# ax.grid(True, which='minor',alpha=0.2) # Turn on Minor Grid
# alpha controls transparency
###################### Single Line ######################
'''
# x = []
# y = []
# ax.plot(x,y,color='black',linestyle='-',linewidth='1')
# # Basic Line Styles: -, --, :, -.
# # Basic Colors: red, blue, green, purple, cyan, magenta, black, brown, etc
# # Can Specify Hex code for colors
# ax.scatter(x,y,color='black',marker='o',size=20)
# # Many Markers: circle-'o', square-'s', triangle-'^',star-'*', x-'x'
# plt.show()
'''
###################### Multi Line ######################
x = [x_meas,x_sim,[1,1],[x_min_data,x_min_data],[0,.125],[0,.125]] # List of Lists
y = [y_meas,y_sim,[0,1.1],[0,12.5],[y_meas_max,y_meas_max],[y_sim_max,y_sim_max]] # List of Lists
#### Lists must be equal length ###
dl = ['Measured', 'Simulated','','','',''] # Data Labels (list)
lc = ['black', 'black','black','black','black','black'] # Line Color |
ls = ['-','--','--','--', '--','--'] # Line Style |
lw = [1.5,2,1,1,1,1] # Line Width V
a = [1,1,1,1,1,1]
s = [] # Marker Size, 20 is default
m = [] # Marker Type, 'o' is default
# Use color-hex.com for color pallets
# Common ones: Shades of Teal, Ocean Breezes By,Ppt Cv
for i in range(len(x)):
ax.plot(x[i],y[i],label=dl[i],color=lc[i],linestyle=ls[i],linewidth=lw[i],alpha=a[i])
#ax.scatter(x[i],y[i],label=dl[i],color=lc[i],marker=m[i],size=s[i])
ax.legend(loc='upper right', bbox_to_anchor=(0.85, 0.85), ncol=1, frameon=False, labelspacing=0.2, columnspacing=0.75,
handlelength=1, handletextpad=0.3)
# anchor loc is based on the plot area, 0.5 is half the width, 1.01 is just above the top
# labelspacing is for vertical spacing, column is for horizontal, handel is for line length, textpad is for handl eto text
plt.tight_layout()
plt.show()

View File

@@ -0,0 +1,114 @@
import numpy as np
import matplotlib.pyplot as plt
def get_data(filename):
file = open(filename)
lines = file.readlines()
x = []
y = []
for line in lines:
line.strip()
data = line.split()
x.append(float(data[0]))
y.append(float(data[1]))
return x, y
x, y = get_data('Python/Plotting/Base/10k_rpm.txt')
################################# BASIC PLOT CODE #################################
# Basic Styling
plt.rcParams.update({
'font.family': 'Courier New', # monospace font
'font.size': 20, # Fonts
'axes.titlesize': 20, # |
'axes.labelsize': 20, # V
'xtick.labelsize': 20,
'ytick.labelsize': 20,
'legend.fontsize': 20,
'figure.titlesize': 20,
'figure.figsize': [10,5] # Figure Size
})
# Figure Setup
fig, ax = plt.subplots()
title = '10,000 rpm Jetfire' # Title
xlab = 'Power [kW]' # X Label
ylab = 'BSFC [g/kW-h]' # Y Label
ax.set_xlabel(xlab)
ax.set_ylabel(ylab)
ax.set_title(title, pad = 20) #pad controls distance to plot
ax.spines['top'].set_visible(False) # Controls non axis borders
ax.spines['right'].set_visible(False)
x_min = 2.5 # Axis Limits and Ticks
x_max = 10
x_step_maj = 1 #steps not division
x_step_min = .25
y_min = 340
y_max = 550
y_step_maj = 25
y_step_min = 5
ax.set_xlim(x_min,x_max) # X limits
ax.set_xticks([3,4,5,6,7,8,9,10]) # X Major Ticks
# ax.set_xticks(np.arange(x_min,x_max,x_step_min), minor=True) # X Minor Ticks
ax.set_ylim(y_min,y_max) # Y limits
ax.set_yticks(np.arange(y_min,y_max,y_step_maj)) # Y Major Ticks
# ax.set_yticks(np.arange(y_min,y_max,y_step_min),minor=True) # Y Minor Ticks
ax.grid(True, which='major',alpha=0.5) # Turn On Major Grid
ax.grid(True, which='minor',alpha=0.2) # Turn on Minor Grid
# alpha controls transparency
###################### Single Line ######################
# x = []
# y = []
ax.plot(x,y,color='black',linestyle='-',linewidth='2')
# Basic Line Styles: -, --, :, -.
# Basic Colors: red, blue, green, purple, cyan, magenta, black, brown, etc
# Can Specify Hex code for colors
# ax.scatter(x,y,color='black',marker='o',size=20)
# Many Markers: circle-'o', square-'s', triangle-'^',star-'*', x-'x'
plt.tight_layout()
plt.show()
###################### Multi Line ######################
# x = [[],[]] # List of Lists
# y = [[],[]] # List of Lists
# #### Lists must be equal length ###
# dl = [] # Data Labels (list)
# lc = [] # Line Color |
# ls = [] # Line Style |
# lw = [] # Line Width V
# a = [] # Transparency
# s = [] # Marker Size, 20 is default
# m = [] # Marker Type, 'o' is default
# # Use color-hex.com for color pallets
# # Common ones: Shades of Teal, Ocean Breezes By,Ppt Cv
# for i in range(len(x)):
# ax.plot(x[i],y[i],label=dl[i],color=lc[i],linestyle=ls[i],linewidth=lw[i], alpha=a[i])
# #ax.scatter(x[i],y[i],label=dl[i],color=lc[i],marker=m[i],size=s[i])
# ax.legend(loc='center', bbox_to_anchor=(0.5, 1.01), ncol=len(x), frameon=False, labelspacing=0.2, columnspacing=0.75,
# handlelength=0.75, handletextpad=0.3)
# # anchor loc is based on the plot area, 0.5 is half the width, 1.01 is just above the top
# # labelspacing is for vertical spacing, column is for horizontal, handel is for line length, textpad is for handl eto text
# plt.tight_layout()
# plt.show()

View File

@@ -0,0 +1,185 @@
import numpy as np
import matplotlib.pyplot as plt
'''
This file gives 2 stacked graphs, both with the options to have multiple data sets (Nominally measured and simulated for the top graph and temperature for the bottom)
It will automatically scale from -180 to 180 for a 2-Stroke
It needs .txt files copied from the data of GT-Power with the format of:
title
data CAD
data CAD
. .
. .
. .
Other needed info: Max y value for the y axis
**Will need to adjust colors, line type, etc.**
'''
def get_data(filename):
file = open(filename)
title = file.readline()
lines = file.readlines()
x = []
y = []
x_shift = []
y_shift = []
for line in lines:
line.strip()
data = line.split()
if float(data[0])<=180:
x.append(float(data[0]))
y.append(float(data[1]))
else:
x_shift.append(float(data[0])-360)
y_shift.append(float(data[1]))
return x_shift+x, y_shift+y
x_meas, y_meas = get_data('Python/Plotting/Base/Measured_P.txt') #Files go here
x_sim, y_sim = get_data("Python/Plotting/Base/Simulated_P.txt")
x_temp, y_temp = get_data("Python/Plotting/Base/temperature.txt")
################################# BASIC PLOT CODE #################################
# Basic Styling
plt.rcParams.update({
'font.family': 'Courier New', # monospace font
'font.size': 20, # Fonts
'axes.titlesize': 20, # |
'axes.labelsize': 20, # V
'xtick.labelsize': 15,
'ytick.labelsize': 15,
'legend.fontsize': 15,
'figure.titlesize': 20,
'figure.figsize': [10,10] # Figure Size
})
# Figure Setup
fig, ax = plt.subplots(2)
title = 'Cylinder Pressure Trace' # Title
ax[0].set_title(title, pad = 20) #pad controls distance to plot
### Figure 1 (top) ###
x_1_lab = '' # X Label
y_1_lab = 'Pressure [Bar]' # Y Label
ax[0].set_xlabel(x_1_lab)
ax[0].set_ylabel(y_1_lab)
ax[0].spines['top'].set_visible(False) # Controls non axis borders
ax[0].spines['right'].set_visible(False)
### Figure 2 (bottom) ###
x_2_lab = '' # X Label
y_2_lab = 'Temperature [K]' # Y Label
ax[1].set_xlabel(x_2_lab)
ax[1].set_ylabel(y_2_lab)
ax[1].spines['top'].set_visible(False) # Controls non axis borders
ax[1].spines['right'].set_visible(False)
### axis is the same for both graphs ###
### x displays on bottom graph only ###
x_min = -180 # Axis Limits and Ticks
x_max = 180
x_step_maj = 1 #steps not division
x_step_min = 1
ax[1].set_xlim(x_min,x_max) # X limits
ax[1].set_xticks([-180,-90,0,90,180],['BDC\n-180°','Intake/Compression','TDC\n','Exhaust/Expansion','BDC\n180°']) # X Major Ticks
ax[1].set_xticks([-180,-90,0,90,180], minor=True) # X Minor Ticks
ax[0].set_xlim(x_min,x_max) # X limits
ax[0].set_xticks([-180,-90,0,90,180],[]) # X Major Ticks
ax[0].set_xticks([-180,-90,0,90,180], minor=True) # X Minor Ticks
### Figure 1 (top) ###
y_1_min = 0
y_1_max = 36
y_1_step_maj = 5
y_1_step_min = 1
ax[0].set_ylim(y_1_min,y_1_max) # Y limits
ax[0].set_yticks(np.arange(y_1_min,y_1_max,y_1_step_maj),tickpad = 10) # Y Major Ticks
# ax.set_yticks(np.arange(y_min,y_max,y_step_min),minor=True) # Y Minor Ticks
ax[0].grid(True, which='major',alpha=0.5) # Turn On Major Grid
ax[0].grid(True, which='minor',alpha=0.2) # Turn on Minor Grid
# alpha controls transparency
### Figure 2 (bottom) ###
y_2_min = 500
y_2_max = 2150
y_2_step_maj = 200
y_2_step_min = 100
ax[1].set_ylim(y_2_min,y_2_max) # Y limits
ax[1].set_yticks(np.arange(y_2_min,y_2_max,y_2_step_maj),tickpad = 10) # Y Major Ticks
# ax[1].set_yticks(np.arange(y_2_min,y_2_max,y_2_step_min),minor=True) # Y Minor Ticks
ax[1].grid(True, which='major',alpha=0.5) # Turn On Major Grid
ax[1].grid(True, which='minor',alpha=0.2) # Turn on Minor Grid
# alpha controls transparency
###################### Single Line ######################
'''
# x = []
# y = []
ax.plot(x,y,color='black',linestyle='-',linewidth='1')
# Basic Line Styles: -, --, :, -.
# Basic Colors: red, blue, green, purple, cyan, magenta, black, brown, etc
# Can Specify Hex code for colors
# ax.scatter(x,y,color='black',marker='o',size=20)
# # Many Markers: circle-'o', square-'s', triangle-'^',star-'*', x-'x'
# plt.show()
'''
###################### Stacked Line ######################
x1 = [x_meas,x_sim,[0,0]] # List of Lists
y1 = [y_meas,y_sim,[0,36]] # List of Lists
dl1 = ['Measured','Simulated',''] # Data Labels (list)
lc1 = ['black','black','black'] # Line Color |
ls1 = ['--','-','-'] # Line Style |
lw1 = [2,2,1] # Line Width V
a1 = [1,1,0.8] # Transparency
for i in range(len(x1)):
ax[0].plot(x1[i],y1[i],label=dl1[i],color=lc1[i],linestyle=ls1[i],linewidth=lw1[i], alpha=a1[i])
ax[0].legend(loc='center', bbox_to_anchor=(0.8,0.8), ncol=1, frameon=True,edgecolor='white',framealpha=1, labelspacing=0.2, columnspacing=0.75,handlelength=0.9, handletextpad=0.3)
# anchor loc is based on the plot area, 0.5 is half the width, 1.01 is just above the top
# labelspacing is for vertical spacing, column is for horizontal, handel is for line length, textpad is for handl eto text
x2 = [x_temp,[0,0]] # List of Lists
y2 = [y_temp,[0,2150]] # List of Lists
dl2 = ['',''] # Data Labels (list)
lc2 = ['black','black'] # Line Color |
ls2 = ['-','-'] # Line Style |
lw2 = [2,1] # Line Width V
a2 = [1,0.8] # Transparency
for i in range(len(x2)):
ax[1].plot(x2[i],y2[i],label=dl2[i],color=lc2[i],linestyle=ls2[i],linewidth=lw2[i], alpha=a2[i])
# ax[1].fill_between(x_temp,y_temp,hatch='///', alpha=0)
# ax[1].legend(loc='center', bbox_to_anchor=(0.8,0.8), ncol=1, frameon=True,edgecolor='white',framealpha=1, labelspacing=0.2, columnspacing=0.75,handlelength=0.9, handletextpad=0.3)
# anchor loc is based on the plot area, 0.5 is half the width, 1.01 is just above the top
# labelspacing is for vertical spacing, column is for horizontal, handel is for line length, textpad is for handl eto text
plt.tight_layout()
plt.show()