timeserieschart

Display days in TimeSeriesChart

♀尐吖头ヾ 提交于 2019-12-11 06:57:51
问题 How can I display the names of the days ("Sunday, Monday....") on the time axis, instead of just the date ? 回答1: You can use setDateFormatOverride(), as shown here. Addendum: isn't there a way to change only the top level? ChartPanel has methods related to the zoom state. You should be able to set the date format as desired either by overriding the chartChanged() method or in response to user input, as suggested in this example. 回答2: Yes: DateAxis xAxis = (DateAxis) plot.getDomainAxis();

Ignoring Time gaps larger than x mins Matplotlib in Python

安稳与你 提交于 2019-12-11 06:41:39
问题 I get data every 5 mins between 9:30am and 4pm. Most days I just plot live intraday data. However, sometimes I want a historical view of lets says 2+ days. The only problem is that during 4pm and 9:30 am I just get a line connecting the two data points. I would like that gap to disappear. My code and an example of what is happening are below; fig = plt.figure() plt.ylabel('Bps') plt.xlabel('Date/Time') plt.title(ticker) ax = fig.add_subplot(111) myFmt = mdates.DateFormatter('%m/%d %I:%M') ax

Alternatives for using forEeach() loop while converting data for D3.js

自闭症网瘾萝莉.ら 提交于 2019-12-09 18:58:37
问题 I am still struggling with this error as indicated in this earlier post on StackOverflow.com. I have isolated the cause of the problem, which is in my D3.js code it is unable to iterate through an 'object'. My raw data source is a RESTful web api. Using jQuery and a JavaScript function I am able to load the values into a variable called 'dataset'. When I output the contents of 'dataset' as an alert, or write it to an html element using jQuery all the data is there. Way too many D3.js examples

Parsing Time Series Data using D3.js

北战南征 提交于 2019-12-07 16:18:15
问题 Hello my StackOverflow friends: It is time to ask for help. I have been studying D3.js for weeks and am just beginning to feel like I understand 10% of it (ha, ha, ha). I am trying to generate a very simple line graph. I am able to do this as long as the data is very simple, but my raw data source has UTC timestamps, and real/decimal numbers that keeps crashing anything beyond simple. The raw data source looks like this: { "Links": {}, "Items": [ { "Timestamp": "2016-07-12T22:21:10Z", "Value"

plotting data for different days on a single HH:MM:SS axis

巧了我就是萌 提交于 2019-12-07 12:16:35
问题 The DataFrame has timestamped data and I want to visually compare the daily temporal evolution of the data. If I groupby day and plot the graphs; they are obviously displaced horizontaly in time due to differences in their dates. I want to plot a date agnostic graph of the day wise trends on a time only axis. Towards that end I have resorted to shift ing the data back by an appropriate number of days as demonstrated in the following code import pandas as pd import datetime import matplotlib

Aggregate time series in python

岁酱吖の 提交于 2019-12-07 11:03:13
问题 How do we aggregate the time series by hour or minutely granularity? If I have a time series like the following then I want the values to be aggregated by hour. Does pandas support it or is there a nifty way to do it in python? timestamp, value 2012-04-30T22:25:31+00:00, 1 2012-04-30T22:25:43+00:00, 1 2012-04-30T22:29:04+00:00, 2 2012-04-30T22:35:09+00:00, 4 2012-04-30T22:39:28+00:00, 1 2012-04-30T22:47:54+00:00, 8 2012-04-30T22:50:49+00:00, 9 2012-04-30T22:51:57+00:00, 1 2012-04-30T22:54:50

determine the coordinates where two pandas time series cross, and how many times the time series cross

感情迁移 提交于 2019-12-07 07:25:21
问题 If I were to graph two time series, let's say they both have an upward positive trend from left to right, is there anyway to use pandas to find where the two lines intersect and how often? For example: How often do the two time series intersect: 1 What are the coordinates of the intersecting points: approx x-axis: 1955 y-axis: 7 回答1: Here is a quick try using pandas. import pandas as pd import numpy as np df = pd.DataFrame({"A":[1,2,3,4,5], "B":[0.5,3,1,1,6]}) print df Which gives A B 0 1 0.5

Problems creating datetime series graph in R using ggplot

[亡魂溺海] 提交于 2019-12-07 00:57:25
I am trying to create a graph with the following characteristics: x-axis: time and date y-axis: data here you can download my dataframe: https://my.cloudme.com/josechka/data I try to produce the graph using: p <- ggplot(data,aes(x = Date, y = Var,group = 1)) + geom_line() + scale_x_date(labels = date_format("%m/%d/%Y")) + scale_y_continuous(limits = c(0, 70000)) p And I get the result: Error: Invalid input: date_trans works with objects of class Date only I am quite new in R and ggplot. What am I doing wrong? As suggested you have to format the Date column into a Date object. data$Date<-as

time series with 10 min frequency in R

北慕城南 提交于 2019-12-06 05:16:50
问题 My data is memory consumption of an application for every 10 minute interval for the last 26 days.My start date is Oct 6th 2013 and end date is Novemeber 2nd 2013.I've read the data in to a time frame and cleaned it up. Now am trying to create a time series , something along the lines of my_ts<-ts(mydata[3],start=c(2013,10),frequency=10) Am sure this not correct as the frequency , can someone point me in the right direction so I can plot the time series . 回答1: In R, frequency actually means

plotting data for different days on a single HH:MM:SS axis

北战南征 提交于 2019-12-05 22:45:01
The DataFrame has timestamped data and I want to visually compare the daily temporal evolution of the data. If I groupby day and plot the graphs; they are obviously displaced horizontaly in time due to differences in their dates. I want to plot a date agnostic graph of the day wise trends on a time only axis. Towards that end I have resorted to shift ing the data back by an appropriate number of days as demonstrated in the following code import pandas as pd import datetime import matplotlib.pyplot as plt index1 = pd.date_range('20141201', freq='H', periods=2) index2 = pd.date_range('20141210',