Skip to content
Advertisement

Tag: matplotlib

Plot specific element values in matplotlib

I have a list as below: I want to show the values of n-th and m-th element of the x-axis and draw a vertical line For example in the graph above, the 100th elements on the x-axis – how can I show the values on the line? I tried to knee but it shows only one elbow. I suggest it

How to plot 3D points in Matplotlib

I have a question I have a dataset which contain 1200060 rows and 3 column. column contain points and I have to draw a 3D plot for it. I’m using the code below but I don’t know where is the error. error is: I tried this one too but unsuccessful this one run but didn’t show any output and using

For loops to iterate through columns of a csv

I’m very new to python and programming in general (This is my first programming language, I started about a month ago). I have a CSV file with data ordered like this (CSV file data at the bottom). There are 31 columns of data. The first column (wavelength) must be read in as the independent variable (x) and for the first

How to plot simple moving averages with stock data

I am trying to plot simple moving averages (SMA) using Apple’s stock price. I have lines below: But the plotting isn’t successful. What did I do wrong, and how I can correct it? Answer From the code you posted, it seems as though you didn’t set the index of the dataframe after loading the data from the csv file. pd.read_csv

Advertisement