Python 3 Programming Tutorial - Matplotlib plotting from a CSV

preview_player
Показать описание
In this Python 3 tutorial, we cover how to plot in Matplotlib from a CSV file.

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6
Рекомендации по теме
Комментарии
Автор

The best python videos on youtube. Thanks Harrison :)

MrDirwood
Автор

Best matplotlib series for beginner. Thank you so much for your tutorials.

nusnanja
Автор

What if I have a file that has many labels on the first line, such as site_name, people, money, date? the next line are the values

wertwertwy
Автор

use np.loadtext(your \\file \\path \\file.txt) dont forget to replace '\' with '\\' in ur path

abhishekparashar
Автор

Is there any off the shelf solution that can open a csv file and the user can select which series to plot, and it will autoscale?

For example, there's csv-plot (both an online version, and a python version Manu NALEPA nalepae/csv-plot )..

Or plotjuggler / matplotlib ? YMT-Lab csv-graph-viewer uses pyqtgraph which seems perfect, but for such a common application I'm hoping to find something that already exists for what I need.

bennguyen
Автор

The CSV I'm using has text headers so I get an error when I run the code: "Could not convert string to float". Is there a way I can get the script to just read and handle integers for the plotting?

Thanks in advance

sescalaster
Автор

I am going to start the matplot series ;) Thanks!!!

danic
Автор

thanks for the tutorials you helped a lot bro awesome very nice

balagoogle
Автор

what if your x values are in row0 and your y values are in row1 in your txt file?

johnwinchester
Автор

Hi Sentdex

I am new to Python and I try to plots many CSV files on single plot :
1. Read multiple (identically formatted) CSV files from a folder
2. Plot column X 'time' vs column Y 'availability' from each of the CSV files on a single plot

Please help me and thanks

moufidarahmani
Автор

Quick question, how would you handle labels at the top of the list:

label1, label2
data1, data2
data3, data4...

ZamaniSahib
Автор

hello, im having a question. In my case, my csv file contain the coordinate with epsilon value, for example: x=4, 869456e+002; y=2, 712950e-002. If i open it with excel, i can see the exact value(x=486, 9456 and y=0, 0271295). But when i read the csv file with python and try to convert from str to float, it says ValueError: could not convert string to float: '4, 869456e+002'. So what do i do now?

.a.m.g
Автор

How can I use x and y in a cycle, I mean, i have the same file but I got to do a lineal regression using the method of "gradiente descendiente", and I have to use every single value of x and y(I use them in an ecuation)... I don't know if I expressed it good...

carojimenez
Автор

I have a dummy excel file, I save it as a .csv extension. "Error, can't convert string to float". How could I filter titles. Or for any reason a random text in the middle of the data?

Boebzorz
Автор

Hi how can i randomly generate a grid of points in a coordinate form. i.e 0, 1  0, 2    1, 0  2, 0    1, 1 and so forth

ndlelasamuel
Автор

Great Tutorial ! I follow your video. But I want the output in .dxf file which can be open in any CAD software such Qcad, LibreCad. Can you suggest something for this?

monishasandal
Автор

I tried to my float data and it said about the delimiter (", ") "too many values to unpack". Any solution sir?

djl
Автор

Hi, thanks for tutorial.
I can't run the codes. It said syntax error: plt.plot(x, y, label = ('Loaded from file')

Please kindly suggest.

maxmclune
Автор

Thanks a lot for the video.
I am receiving an error that name loadtxt is not defined.
How can I resolve this? Thanks

Scientist
Автор

...But what if you have an entire table, and you want to assign X and Y to a row and a column...

errinwright