GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 18618f...2bf8c5 )
by
unknown
02:16
created

cv_trial   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 317
Duplicated Lines 9.46 %

Importance

Changes 0
Metric Value
eloc 240
dl 30
loc 317
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A voltcycle.cv_trial.cv.det() 0 2 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
# Import packages
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
2
import pandas as pd
3
import numpy as np
4
import csv
5
import matplotlib.pyplot as plt
6
from dir_walker import walker
7
import os
8
import warnings
9
10
#-----------------------------------MODULE CHECKS------------------------------
11
12
# Check for modules, try to exit gracefully if not found
13
import sys
14
import imp
15
try:
16
    imp.find_module('numpy')
17
    foundnp = True
18
except ImportError:
19
    foundnp = False
20
try:
21
    imp.find_module('matplotlib')
22
    foundplot = True
23
except ImportError:
24
    foundplot = False
25
try:
26
    imp.find_module('pandas')
27
    foundpd = True
28
except ImportError:
29
    foundplot = False
30
if not foundnp:
31
    print("Numpy is required. Exiting")
32
    sys.exit()
33
if not foundplot:
34
    print("Matplotlib is required. Exiting")
35
    sys.exit()
36
if not foundpd:
0 ignored issues
show
introduced by
The variable foundpd does not seem to be defined for all execution paths.
Loading history...
37
    print("Pandas is required. Exiting")
38
    sys.exit()
39
40
#-------------------------------------------------------------------------------
41
class cv:
42
    _colors = {'red': 'r', 'green': 'g', 'blue': 'b', 'yellow': 'y', 'cyan': 'c', 'magenta': 'm', 'black': 'k', 'white': 'w'}
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (125/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
43
    _linestyles = {' ': ' ', '-': 'solid', '--': 'dashed', '-.': 'dash_dot', ':': 'dotted'}
44
    _markers  = {' ': ' ', '.': '.', '_' : '_', 'o': 'o', '*': '*', '+': '+', 'x': 'x', 'square': 's', 'triangle': '^', 'diamond': 'd'}
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (135/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Exactly one space required before assignment
Loading history...
45
46
    # Find relevant files in folder
47
    path = os.getcwd()
48
    extension = ['csv','txt','dat'] # Should include all the possible ones
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
49
    os.chdir(path)
50
    result = [i for i in glob.glob('*.{}'.format(extension))]
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable glob does not seem to be defined.
Loading history...
51
    print("Plotting the following:")
52
    print(result)
53
    #Make x-axis
54
    t = np.linspace(325, 1100, 776)
55
56
    def det(a, b):
57
        return a[0] * b[1] - a[1] * b[0]
58
59
    #set initial values (for later use)
60
    k=0
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
61
    totalexport=[]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
62
    #iterate through CSVs
63
    while k < len(csvresult):
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable csvresult does not seem to be defined.
Loading history...
64
        horiz=.04
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
65
        exportlist=[]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
66
        path = os.getcwd()
67
        path = path + "/" + csvresult[k]
68
        cv=pd.read_csv(path, delimiter=",", error_bad_lines=False)
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
69
70
        #Extract Data from Current Column
71
        currentwhole=cv.values[:,1]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
72
        ind=np.where(currentwhole == ' Current/A')
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
73
        startdata=ind[0][0]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
74
        startdata=startdata + 1
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
75
        currentdatastr=cv.values[startdata:,1]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
76
77
        #Extract Data from Potential Column
78
        potentialdatastr=cv.values[startdata:,0] 
0 ignored issues
show
Coding Style introduced by
Trailing whitespace
Loading history...
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
79
80
        #Convert all elements from strings to floats so they can be math. manipulated
81
        currentdataOG = [ float(x) for x in currentdatastr ]
0 ignored issues
show
Coding Style introduced by
No space allowed after bracket
Loading history...
Coding Style introduced by
No space allowed before bracket
Loading history...
82
        potentialdata = [ float(x) for x in potentialdatastr ]
0 ignored issues
show
Coding Style introduced by
No space allowed after bracket
Loading history...
Coding Style introduced by
No space allowed before bracket
Loading history...
83
        #Multiply current data to fit axis properly
84
        currentdata = [ i * (100000) for i in currentdataOG ]
0 ignored issues
show
Coding Style introduced by
No space allowed after bracket
Loading history...
Coding Style introduced by
No space allowed before bracket
Loading history...
85
        #assign attributes to plot
86
        colour = 'b'
87
        plotlabel = csvresult[k]
88
        plotlabel = plotlabel[:-4]
89
        totalexport.append(plotlabel)
90
        #plot graph
91
        plt.plot(potentialdata, currentdata, colour, label= plotlabel)
0 ignored issues
show
Coding Style introduced by
No space allowed after keyword argument assignment
Loading history...
92
        plt.draw()
93
94
        count=1
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
95
        while count <= 2:
96
            xline1=[] #x values of line 1 to fill in as code proceeds
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
97
            yline1=[]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
98
            xline2=[]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
99
            yline2=[]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
100
            #Point Clicks and Intersections
101 View Code Duplication
            if count==1:
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Coding Style introduced by
Exactly one space required around comparison
Loading history...
102
                print('>> Please choose two points for first line (onset of oxidation)')
103
                line1 = plt.ginput(2) # it will wait for two clicks
104
                line1=np.array(line1)
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
105
                x1=line1[0,0]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
106
                xline1.append(x1)
107
                y1=line1[0,1]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
108
                yline1.append(y1)
109
                print('>> Please choose two points for first line (onset of oxidation)')
110
                line2 = plt.ginput(2)
111
                line2=np.array(line2)
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
112
                x2=line2[0,0]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
113
                xline2.append(x2)
114
                y2=line2[0,1]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
115
                yline2.append(y2)
116 View Code Duplication
            if count==2:
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Coding Style introduced by
Exactly one space required around comparison
Loading history...
117
                print('>> Please choose two points for first line (onset of reduction)')
118
                line1 = plt.ginput(2) # it will wait for two clicks
119
                line1=np.array(line1)
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
120
                x1=line1[0,0]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
121
                xline1.append(x1)
122
                y1=line1[0,1]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
123
                yline1.append(y1)
124
                print('>> Please choose two points for first line (onset of reduction)')
125
                line2 = plt.ginput(2)
126
                line2=np.array(line2)
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
127
                x2=line2[0,0]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
128
                xline2.append(x2)
129
                y2=line2[0,1]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
130
                yline2.append(y2)
131
            #Find intersection
132
            xdiff = (line1[0][0] - line1[1][0], line2[0][0] - line2[1][0])
0 ignored issues
show
introduced by
The variable line1 does not seem to be defined for all execution paths.
Loading history...
introduced by
The variable line2 does not seem to be defined for all execution paths.
Loading history...
133
            ydiff = (line1[0][1] - line1[1][1], line2[0][1] - line2[1][1])
134
            div = det(xdiff, ydiff)
135
                #if div == 0:
136
                   #raise Exception('lines do not intersect')
137
            d = (det(*line1), det(*line2))
138
139
            #calculate onset
140
            x = det(d, xdiff) / div
141
            xline1.append(x)
142
            xline2.append(x)
143
            #make point of intersection
144
            y = det(d, ydiff) / div
145
            yline1.append(y)
146
            yline2.append(y)
147
148
            plt.plot(xline1,yline1,'r')
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
149
            plt.plot(xline2,yline2,'r')
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
150
            plt.draw()
151
152
            exportlist.append(x)
153
            #calculate homo/lumo
154
            holu = x - 4.8
155
            exportlist.append(holu)
156
            #round these values
157
            x = round(x,2)
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
158
            holu = round(holu,2)
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
159
            #make these strings instead of integers
160
            x = str(x)
161
            holu = str(holu)
162
            #print message on command prompt
163
            if count==1:
0 ignored issues
show
Coding Style introduced by
Exactly one space required around comparison
Loading history...
164
                print('------------')
165
                print("Oxidation onset:")
166
                print(x + " V")
167
                print('------------')
168
            if count==2:
0 ignored issues
show
Coding Style introduced by
Exactly one space required around comparison
Loading history...
169
                print('------------')
170
                print("Reduction onset:")
171
                print(x + " V")
172
                print('------------')
173
            count=count+1
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
174
175
        totalexport.append(exportlist)
176
        #write texts to put on chart
177
        ox=exportlist[0]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
178
        ox=round(ox,3)
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
179
        ox=str(ox)
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
180
        homo=exportlist[1]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
181
        homo=round(homo,3)
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
182
        homo=str(homo)
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
183
        red=exportlist[2]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
184
        red=round(red,3)
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
185
        red=str(red)
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
186
        lumo=exportlist[3]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
187
        lumo=round(lumo,3)
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
188
        lumo=str(lumo)
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
189
        oxtxt = 'OX' '$_{onset}$' + ' = ' + ox + "V"
190
        redtxt = 'RED' '$_{onset}$' + ' = ' + red + "V"
191
        homotxt = 'HOMO = ' + homo + "eV"
192
        lumotxt = 'LUMO = ' + lumo + "eV"
193
        #change initial value and make first text label
194
        plt.gca().set_position((.1, .28, .8, .65)) # to make a bit of room for extra text
195
        vert = 0.14
196
        plt.figtext(horiz,vert,plotlabel,style='italic')
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
197
        #plt.figure().add_subplot(111).plot(range(10), range(10))
198
        txtlist = [oxtxt,redtxt,homotxt, lumotxt]
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
199
        i=0
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
200
        #iterate through text list to make text boxes of values
201
        while i < len(txtlist):
202
            if i == 2:
203
                horiz=horiz+0.25
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
204
                vert=vert+0.1
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
205
            vert=vert-0.05
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
206
            curr=txtlist[i]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
207
            plt.figtext(horiz,vert,curr)
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
208
            i=i+1
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
209
            continue
210
        #----------------------------------EXCEL EXPORT---------------------------------
211
212
        # Create a Pandas dataframe title for data.
213
        df0 = pd.DataFrame({'Data': ['Onset of Oxidation (V)','HOMO (eV)','Onset of Reduction (V)','LUMO (eV)']})
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (113/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Exactly one space required after comma
Loading history...
214
215
        # Create a Pandas Excel writer using XlsxWriter as the engine.
216
        folder = 'Processed CV Data'
217
        if not os.path.exists(folder):
218
            os.makedirs(folder)
219
220
        calcname=csvresult[k]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
221
        calcname=calcname + '-calcs.xlsx'
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
222
        writer = pd.ExcelWriter(os.path.join(folder,calcname), engine='xlsxwriter')
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
223
224
        #Loop through data from total export list
225
        j=0
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
226
        index=1
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
227
        while j < len(totalexport):
228
            plotlabel=totalexport[j]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
229
            data=totalexport[j+1]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
230
            df = pd.DataFrame({plotlabel: data})
231
            df.to_excel(writer, sheet_name='Sheet1', startcol=index, index=False)
232
            j=j+2
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
233
            index=index+1
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
234
            continue
235
236
        # Convert the dataframe to an XlsxWriter Excel object.
237
        df0.to_excel(writer, sheet_name='Sheet1', startrow=1, header = False, index=False)
0 ignored issues
show
Coding Style introduced by
No space allowed around keyword argument assignment
Loading history...
238
239
        # Get the xlsxwriter workbook and worksheet objects.
240
        workbook  = writer.book
0 ignored issues
show
Coding Style introduced by
Exactly one space required before assignment
Loading history...
241
        worksheet = writer.sheets['Sheet1']
242
243
        # Set the column width and format.
244
        worksheet.set_column('A:A', 20)
245
        worksheet.set_column('B:B', 15)
246
        worksheet.set_column('C:C', 15)
247
        worksheet.set_column('D:D', 15)
248
249
        # Close the Pandas Excel writer and output the Excel file.
250
        writer.save()
251
        msg= csvresult[k][:-4] + ' CV Calculations exported --------->'
0 ignored issues
show
Coding Style introduced by
Exactly one space required before assignment
Loading history...
252
        print(msg)
253
254
        #---------> DATA TO CREATE GRAPH IN EXCEL
255
256
        # Create a Pandas Excel writer using XlsxWriter as the engine.
257
        dataname=csvresult[k]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
258
        dataname=dataname + '-dataset.xlsx'
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
259
        writer = pd.ExcelWriter(os.path.join(folder,dataname), engine='xlsxwriter')
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
260
261
        #Create wavelength column
262
        potentialdatastr=[float(x) for x in potentialdatastr]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
263
        df = pd.DataFrame({'Potential/ V': potentialdatastr})
264
        df.to_excel(writer, sheet_name='Sheet1', startcol=0, startrow=0, index=False)
265
        df1 = pd.DataFrame({'Current/ A': currentdatastr})
266
        df1.to_excel(writer, sheet_name='Sheet1', startcol=1, startrow=0, index=False)
267
        i=0
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
268
        currentdatastr=[float(x) for x in currentdatastr]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
269
        microcurrentdatastr=[x*1000000 for x in currentdatastr]
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
270
        df2 = pd.DataFrame({'Current/ microA': microcurrentdatastr})
271
        df2.to_excel(writer, sheet_name='Sheet1', startcol=2, startrow=0, index=False)
272
273
        # Get the xlsxwriter workbook and worksheet objects.
274
        workbook  = writer.book
0 ignored issues
show
Coding Style introduced by
Exactly one space required before assignment
Loading history...
275
        worksheet = writer.sheets['Sheet1']
276
277
        # Set the column width and format.
278
        worksheet.set_column('A:A', 11)
279
        worksheet.set_column('B:B', 11)
280
        worksheet.set_column('C:C', 11)
281
282
        # Close the Pandas Excel writer and output the Excel file.
283
        writer.save()
284
        msg= csvresult[k][:-4] + ' CV Dataset exported --------->'
0 ignored issues
show
Coding Style introduced by
Exactly one space required before assignment
Loading history...
285
        print(msg)
286
287
        #-------------------------------------------------------------------------------
288
289
        #Bold axis numbers and change font sizes
290
        ax=plt.gca()
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
291
        for tick in ax.xaxis.get_major_ticks():
292
            tick.label1.set_fontsize(9)
293
            tick.label1.set_fontweight('bold')
294
        for tick in ax.yaxis.get_major_ticks():
295
            tick.label1.set_fontsize(9)
296
            tick.label1.set_fontweight('bold')
297
        #Labels
298
        plt.xlabel('Potential (V) / V',weight='bold')
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
299
        plt.ylabel('Current (I) / x10$^{-1}$${\mu}A$',weight='bold')
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
Bug introduced by
A suspicious escape sequence \m was found. Did you maybe forget to add an r prefix?

Escape sequences in Python are generally interpreted according to rules similar to standard C. Only if strings are prefixed with r or R are they interpreted as regular expressions.

The escape sequence that was used indicates that you might have intended to write a regular expression.

Learn more about the available escape sequences. in the Python documentation.

Loading history...
300
        plt.draw()
301
        #Graph Finished Message
302
        sep=" "
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
303
        name = os.getlogin()
304
        name = name.split(sep, 1)[0]
305
        msg = 'Hey ' + name + ', ' + csvresult[k][:-4] + "'s graph has finished processing."
306
        picname= csvresult[k][:-4] + '.png'
0 ignored issues
show
Coding Style introduced by
Exactly one space required before assignment
Loading history...
307
        print(msg)
308
        plt.savefig(os.path.join(folder,picname), bbox_inches='tight')
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
309
        k=k+1
0 ignored issues
show
Coding Style introduced by
Exactly one space required around assignment
Loading history...
310
        #case where if you reach your last CSV, then break the loop
311
        plt.show()
312
        if k == len(csvresult):
313
            plt.title('Cyclic Voltammetry',weight='bold')
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Loading history...
314
            plt.legend(loc='best')
315
            break
316
        continue
317