Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81590348
PlottingCSVfile.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Sep 6, 22:18
Size
1 KB
Mime Type
text/x-python
Expires
Sun, Sep 8, 22:18 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
20544886
Attached To
rNPTOOLS Nanopore Tools
PlottingCSVfile.py
View Options
import
sys
import
os
import
matplotlib.pyplot
as
plt
import
pandas
as
pd
import
numpy
as
np
from
tkinter.filedialog
import
askopenfilenames
#Updated 23-11-2018
filenames
=
askopenfilenames
()
for
filename
in
filenames
:
#Update your column names
data_file
=
pd
.
read_csv
(
filename
)
#For Excel files or csv files change yourself
column1
=
data_file
[
'x000'
]
#x-axis data
column2
=
data_file
[
'y000)'
]
#y-axis data 1
#column3 = data_file ['Put column 3 name here'] #y-axis data 2 #Uncomment if you have multiple y-axis data e.g. column 3 etc
# Aesthetics: comment the part that starts from marker stuff if not required
plt
.
plot
(
column1
,
column2
,
marker
=
'.'
,
markerfacecolor
=
'blue'
,
markersize
=
12
,
color
=
'red'
,
linewidth
=
4
)
plt
.
xscale
(
'log'
)
plt
.
title
(
'MoS2 nanopore ionic current, 300 mV, 1M KCl, pH 7.5'
)
plt
.
grid
(
True
)
#plt.plot (column1, column3, marker='', color='olive', linewidth=2, linestyle='dashed', label="toto")
plt
.
xlabel
(
'Time (ks)'
)
and
plt
.
ylabel
(
'Current (nA)'
)
plt
.
show
()
#print (data_file) just in case if u want to see wht you are actually printing, sometimes the plot is reversed!!!
Event Timeline
Log In to Comment