Python Forum
matplotlib help with reading values from CSV file
Thread Rating:
  • 3 Vote(s) - 3.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
matplotlib help with reading values from CSV file
#3
@ DeaD_EyE

I'm sorry but I don't know how to integrate that into my code. Would this be done outside of the 'def graph' I have?

thanks


I have actually changed my code slightly to:

def graph(self):
x = np.loadtxt('log0.csv', delimiter=',', skiprows=2,usecols=[0,])
y = np.loadtxt('log0.csv', delimiter=',', skiprows=2,usecols=[1,])
plt.plot(x,y)
plt.xlabel('Time')
plt.ylabel('Load Value')
plt.title('Logged Load\n')
plt.show()
Reply


Messages In This Thread
RE: matplotlib help with reading values from CSV file - by cps13 - Aug-21-2017, 09:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading large crapy text file in anaconda to profile data syamatunuguntla 0 843 Nov-18-2022, 06:15 PM
Last Post: syamatunuguntla
  Matplotlib scatter plot in loop with None values ivan_sc 1 2,294 Nov-04-2021, 11:25 PM
Last Post: jefsummers
  [solved] Save a matplotlib figure into hdf5 file paul18fr 1 2,543 Jun-08-2021, 05:58 PM
Last Post: paul18fr
  How to form a dataframe reading separate dictionaries from .txt file? Doug 1 4,277 Nov-09-2020, 09:24 AM
Last Post: PsyPy
  reading tab file Mandiph 1 2,213 Sep-05-2019, 01:03 PM
Last Post: ThomasL
  Reading values into df.loc silkpantsman 0 1,506 Jul-26-2019, 08:34 AM
Last Post: silkpantsman
  Reading a .dat file in Python mohd_umair 4 23,634 Apr-24-2019, 12:07 PM
Last Post: mohd_umair
  Reading time steps from nc file ankurk017 1 2,614 Jul-16-2018, 07:06 PM
Last Post: woooee
  reading, modifying and writing json file metalray 2 10,964 Jun-06-2018, 03:09 PM
Last Post: metalray
  Reading json file as pandas data frame? Alberto 1 8,393 Feb-05-2018, 12:43 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020