practice/dash_resumable_upload.py 1 location
|
@@ 152-173 (lines=22) @@
|
| 149 |
|
return data |
| 150 |
|
|
| 151 |
|
|
| 152 |
|
def plot_fig(dict_cycle, n): |
| 153 |
|
"""For basic plotting of the cycle data |
| 154 |
|
|
| 155 |
|
Parameters |
| 156 |
|
__________ |
| 157 |
|
dict: dictionary of dataframes for all the cycles |
| 158 |
|
n: number of cycles |
| 159 |
|
|
| 160 |
|
Saves the plot in a file called cycle.png |
| 161 |
|
""" |
| 162 |
|
|
| 163 |
|
for i in range(n): |
| 164 |
|
print(i+1) |
| 165 |
|
df = data_frame(dict_cycle, i+1) |
| 166 |
|
plt.plot(df.Potential, df.Current, label = "Cycle{}".format(i+1)) |
| 167 |
|
|
| 168 |
|
#print(df.head()) |
| 169 |
|
plt.xlabel('Voltage') |
| 170 |
|
plt.ylabel('Current') |
| 171 |
|
plt.legend() |
| 172 |
|
plt.savefig('cycle.png') |
| 173 |
|
print('executed') |
| 174 |
|
|
| 175 |
|
|
| 176 |
|
#split forward and backward sweping data, to make it easier for processing. |
practice/core.py 1 location
|
@@ 152-173 (lines=22) @@
|
| 149 |
|
return data |
| 150 |
|
|
| 151 |
|
|
| 152 |
|
def plot_fig(dict_cycle, n): |
| 153 |
|
"""For basic plotting of the cycle data |
| 154 |
|
|
| 155 |
|
Parameters |
| 156 |
|
__________ |
| 157 |
|
dict: dictionary of dataframes for all the cycles |
| 158 |
|
n: number of cycles |
| 159 |
|
|
| 160 |
|
Saves the plot in a file called cycle.png |
| 161 |
|
""" |
| 162 |
|
|
| 163 |
|
for i in range(n): |
| 164 |
|
print(i+1) |
| 165 |
|
df = data_frame(dict_cycle, i+1) |
| 166 |
|
plt.plot(df.Potential, df.Current, label = "Cycle{}".format(i+1)) |
| 167 |
|
|
| 168 |
|
#print(df.head()) |
| 169 |
|
plt.xlabel('Voltage') |
| 170 |
|
plt.ylabel('Current') |
| 171 |
|
plt.legend() |
| 172 |
|
plt.savefig('cycle.png') |
| 173 |
|
print('executed') |
| 174 |
|
|
| 175 |
|
|
| 176 |
|
#split forward and backward sweping data, to make it easier for processing. |
voltcycle/core.py 1 location
|
@@ 152-173 (lines=22) @@
|
| 149 |
|
return data |
| 150 |
|
|
| 151 |
|
|
| 152 |
|
def plot_fig(dict_cycle, n): |
| 153 |
|
"""For basic plotting of the cycle data |
| 154 |
|
|
| 155 |
|
Parameters |
| 156 |
|
__________ |
| 157 |
|
dict: dictionary of dataframes for all the cycles |
| 158 |
|
n: number of cycles |
| 159 |
|
|
| 160 |
|
Saves the plot in a file called cycle.png |
| 161 |
|
""" |
| 162 |
|
|
| 163 |
|
for i in range(n): |
| 164 |
|
print(i+1) |
| 165 |
|
df = data_frame(dict_cycle, i+1) |
| 166 |
|
plt.plot(df.Potential, df.Current, label = "Cycle{}".format(i+1)) |
| 167 |
|
|
| 168 |
|
#print(df.head()) |
| 169 |
|
plt.xlabel('Voltage') |
| 170 |
|
plt.ylabel('Current') |
| 171 |
|
plt.legend() |
| 172 |
|
plt.savefig('cycle.png') |
| 173 |
|
print('executed') |
| 174 |
|
|
| 175 |
|
|
| 176 |
|
#split forward and backward sweping data, to make it easier for processing. |
voltcycle/submodule/file_read.py 1 location
|
@@ 99-120 (lines=22) @@
|
| 96 |
|
data = pd.DataFrame(zippedList, columns = ['Potential' , 'Current']) |
| 97 |
|
return data |
| 98 |
|
|
| 99 |
|
def plot_fig(dict_cycle, n): |
| 100 |
|
"""For basic plotting of the cycle data |
| 101 |
|
|
| 102 |
|
Parameters |
| 103 |
|
__________ |
| 104 |
|
dict: dictionary of dataframes for all the cycles |
| 105 |
|
n: number of cycles |
| 106 |
|
|
| 107 |
|
Saves the plot in a file called cycle.png |
| 108 |
|
""" |
| 109 |
|
|
| 110 |
|
for i in range(n): |
| 111 |
|
print(i+1) |
| 112 |
|
df = data_frame(dict_cycle, i+1) |
| 113 |
|
plt.plot(df.Potential, df.Current, label = "Cycle{}".format(i+1)) |
| 114 |
|
|
| 115 |
|
print(df.head()) |
| 116 |
|
plt.xlabel('Voltage') |
| 117 |
|
plt.ylabel('Current') |
| 118 |
|
plt.legend() |
| 119 |
|
plt.savefig('cycle.png') |
| 120 |
|
print('executed') |
| 121 |
|
|