Skip to main content

All Questions

1 vote
2 answers
7k views

Import/read csv file in python, then plotting, gives x=y plot?

This is something that probably has a very obvious fix. I'm using Python 2.7 and I'm in Spyder 3.2.4. I'm trying to plot a very straightforward (albeit large) bit of data from a csv file by reading it ...
albc's user avatar
  • 23
0 votes
0 answers
926 views

How can I show UTC time on x axis of matplotlib [duplicate]

I've tried several solutions, but I think I'm not really grasping what format matplotlib wants. I want my x axis to go from the epoch time I'm given, to UTC time shown in a format similar to 8:20pm ...
praiseHellRaiseDale's user avatar
4 votes
1 answer
2k views

Plot a graph by reading coulmns from CSV

I have a csv file which contains four columns. The first column in time, the second, third and fourth columns are Accelerometer readings. I want to plot Time on X-Axis and the Accelerometer reading on ...
mgmihir's user avatar
  • 43
1 vote
2 answers
773 views

Python: Timestamp error on matplotlib line plot x-axis

I am trying to produce a line plot from a csv file with the data formatted: Time,Temp 05 Oct 4:35 pm,68 05 Oct 4:30 pm,68 05 Oct 4:20 pm,68 The code I used is: import matplotlib.pyplot as plt ...
WandaW's user avatar
  • 15
1 vote
2 answers
156 views

Plotting a Pandas Framework from a CSV File

Good morning everyone, Basically, I am doing a Dataframe to the number of won in a lottery here where I live. I am stuck in plotting a Dataframe that I created from a CSV file. This is my code: ...
Bachmann's user avatar
2 votes
1 answer
1k views

Loop through csv file and plot columns?

I'm having so much trouble and I'd like if I could get a hand. I'm trying to read through a csv file and extract the columns and plot whatever columns are listed in column_index, which is actually an ...
Nikitau's user avatar
  • 371
0 votes
3 answers
4k views

How to save certain columns from csv file as variables in Python? [duplicate]

I want to save and graph certain columns in Python using matplotlib. The argument for the columns will be obtained from the cmdline, so I'll have to use sys.argv to obtain them. Here's what I have ...
Nikitau's user avatar
  • 371
2 votes
1 answer
518 views

How to group a column in a csv file by a range and plot histogram using python?

I have a dataset which has over 20 columns and one of them is "Trip_distance" and there are over 100,000 rows in it. This is a sample of the column "Trip_distance": [0 0 0.59 0.74 0.61 1.07 ...
Shashaank Sivakumar's user avatar
0 votes
1 answer
981 views

How can I get the radio button in Matplotlib to update 4 subplots together?

I would highly appreciate your help here. I have 3 .csv files with some data in them. Each .csv file creates 4 histograms. I have created 4 subplots for each histogram. I have also created a radio ...
Maroof G's user avatar
  • 575
3 votes
1 answer
10k views

Arrows on Scatter

Having had no luck myself I'm looking for a bit of assistance with this problem I have run into. I have CSV data in this format. Flow Amount,X_Start,Y_Start,X_End,Y_End 4,36.20740741,31.97407407,48....
FootyStattowannab3's user avatar
1 vote
1 answer
4k views

Plot a 2D graph from a csv file using matplotlib in Python in ubuntu

I have to plot the values from a csv file into graph using python. I am using the follow code in python. CODE: import numpy as np import matplotlib.pyplot as plt def graph(): cv,dv = np.loadtxt('...
user known's user avatar
0 votes
1 answer
87 views

How to plot multiple graph in one figure by fetching data from one csv file (matplotlib or panda)

I am trying to plot graph of internet speed. In graph both downloading and uploading speed should show with time series. Both speeds and date time have saved to a csv file. And the file has time, ...
Babeesh's user avatar
  • 107
3 votes
1 answer
4k views

Renaming the x-axis values in matplotlib

NOTE: This is all done on a windows 7 x64bit machine running python2.7 and the most recent version of matplotlib. I have a csv file that contains the liquor sales in Iowa from January 2014 to ...
ay-ay-ron's user avatar
  • 302
2 votes
1 answer
4k views

Plot normal distribution in Python from a .csv file

The following script draws the Normal Distribution of a sort of data given. import numpy as np import scipy.stats as stats import pylab as pl h = sorted ([0.9, 0.6, 0.5, 0.73788,...]) #Data that I ...
Informatico_Sano's user avatar
3 votes
1 answer
5k views

plotting polynomial regression in same plot as the real data

I have some snippets of code that read two csvs and plot them using matplotlib.pyplot and perform polynomial regression on the same two csvs. What I want to be able to do is plot both the data and my ...
GTPE's user avatar
  • 83

15 30 50 per page