timeserieschart

matplotlib: plotting timeseries while skipping over periods without data

孤街浪徒 提交于 2019-12-23 02:28:23
问题 tl;dr: how can I skip over periods where there is no data while plotting timeseries? I'm running a long calculation and I'd like to monitor its progress. Sometimes I interrupt this calculation. The logs are stored in a huge CSV file which looks like this: 2016-01-03T01:36:30.958199,0,0,0,startup 2016-01-03T01:36:32.363749,10000,0,0,regular ... 2016-01-03T11:12:21.082301,51020000,13402105,5749367,regular 2016-01-03T11:12:29.065687,51030000,13404142,5749367,regular 2016-01-03T11:12:37.657022

JFreeChart - change SeriesStroke of chart lines from solid to dashed in one line

旧城冷巷雨未停 提交于 2019-12-19 05:53:07
问题 The answer accepted here (JFreechart(Java) - How to draw lines that is partially dashed lines and partially solid lines?) helped me start down the path of changing my seriesstroke lines on my chart. After stepping through my code and watching the changes, I see that my seriesstroke does in fact change to "dashedStroke" when it is supposed to (after a certain date "dashedAfter"), but when the chart is rendered the entire series line is dashed. How can I get a series line to be drawn solid at

Why is the data in a timeseriescollection chart don't appear correctly?

你说的曾经没有我的故事 提交于 2019-12-13 02:07:21
问题 I'm made ​​a chart timeseriescollection type. I'm fetching the following values ​​to the database. However when creating the graph, the values ​​shown are not entirely accurate. Can someone tell me why this happens? Only shows the date. Hours not appear correctly. Does anyone can help me solve this little problem please? I would be eternally grateful. Thank you all very much. Values from Database. select (CONCAT(data_registo, ' ', hora_registo)) as data, temperatura from registos where

Turning the second timeseries in a TimeseriesChart to a barchart

[亡魂溺海] 提交于 2019-12-13 01:21:27
问题 As the heading implies, I have a timeseries chart that displays two curves, each a TimeSeries, both part of the same TimeSeriesCollection. What I want to do is display the second TimeSeries as a barchart, but I want both TimeSeries still in the same chart. Is this possible? 回答1: Yes this is possible, look at the OverlaidXYPlotDemo1 and OverlaidXYPlotDemo2 charts in the sample demo application that you can run from the JFree site. If you purchase the documentation they will send you the actual

Timeline bar with colour/fill based on time-series' value (R ggplot)

Deadly 提交于 2019-12-13 00:42:55
问题 I've got a time-series data frame with pressure readings taken at regular intervals. time pressure diff 1 2014-09-09 09:12:29 1.6191598 0.00000000 2 2014-09-09 09:12:28 3.0137784 -0.07668387 3 2014-09-09 09:12:27 1.1958183 0.58693260 4 2014-09-09 09:12:26 2.2803681 1.07774954 5 2014-09-09 09:12:25 -0.7614310 -0.17864232 6 2014-09-09 09:12:24 0.9914106 -0.70121973 I can easily make a line plot of the pressure using ggplot2. But below this line plot, I'd like to have a horizontal bar where the

R Time Series plot.ts()

社会主义新天地 提交于 2019-12-13 00:35:04
问题 I am trying to read in a time series and do a plot.ts(), however I am getting weird results. Perhaps I did something wrong. I tried including the start and end dates but the output is still wrong. Any help appreciated. Thank you. This is the code and output: sales1 <- read.csv("TimeS.csv",header=TRUE) sales1 salesT <- ts(sales1) salesT plot.ts(salesT) output: > sales1 <- read.csv("TimeS.csv",header=TRUE) > sales1 year q1 q2 q3 q4 1 1991 4.8 4.1 6.0 6.5 2 1992 5.8 5.2 6.8 7.4 3 1993 6.0 5.6 7

Python: Bar chart - plot sum of values by a) year and b) quarter across all years

梦想与她 提交于 2019-12-12 23:44:51
问题 I have time series data, i.e. by date (YYYY-MM-DD), returns, pnl, # of trades: date returns pnl no_trades 1998-01-01 0.01 0.05 5 1998-01-02 -0.04 0.12 2 ... 2010-12-31 0.05 0.25 3 Now I would like to show horizontal bar charts with a) the average of the returns b) sum of the pnls by: 1) year, i.e. 1998, 1999, ..., 2010 2) quarter across all years, i.e. Q1 (YYYY-01-01 to YYYY-03-31), Q2, .., Q4 Additionally, the sum of # of trades per 1) and 2) should denote a number next to each of the

“NA” results in Decomposition of Additive Time Series in R

爷,独闯天下 提交于 2019-12-12 04:42:43
问题 I'm trying to understand my "decomposition of additive time series" graph. Here's my code: dbs_discs <- ts(RC$Disconnects, frequency =12, start=c(2013,1)) discs_dbs <- decompose(dbs_discs) plot(discs_dbs) discs_dbs and my results: $trend Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 2013 NA NA NA NA NA NA 301.8891 302.4746 302.6317 303.1842 304.2663 304.2212 2014 304.6779 306.3847 309.0182 310.5303 309.9420 309.1160 307.1276 304.2277 302.4454 301.2108 300.1494 299.7908 2015 299.5936 299

Pandas, Bokeh, or using any plotting library for shifting the x-axis for seasonal data (months 7 -> 12 -> 6 or July 01 - June 30)

柔情痞子 提交于 2019-12-12 03:57:02
问题 I want to display seasonal snow data for the seasonal year from July 01 - June 30. df = pd.DataFrame({'date1':['1954-03-20','1955-02-23','1956-01-01','1956-11-21','1958-01-07'], 'date2':['1954-03-25','1955-02-26','1956-02-11','1956-11-30','1958-01-17']}, index=['1954','1955','1956','1957','1958']) It is an extension to my previous question Pandas: Visualizing Changes in Event Dates for Multiple Years using Bokeh or any other plotting library Scott Boston, in his answer to my comment in that

R ggplot colour labelling time series based on class

不想你离开。 提交于 2019-12-11 23:47:32
问题 I have two time series as below: y1 <- mvrnorm(50, c(3,1), matrix(c(0.5,0.3,0.3,0.3),2,2))# 2-D bivariate normal y2 <- mvrnorm(50, c(1,0), matrix(c(2,.1,.1,1),2,2))# another 2-D bivariate normal y <- rbind(y1,y2) # append the second to the end of the first I plot these with ggplot: yd <- as.data.frame(y) g<- ggplot(data=yd) + geom_line(aes(x=1:nrow(yd), y=yd$V1, colour= "TS1"))+ geom_line(aes(x=1:nrow(yd), y=yd$V2, colour= "TS2"))+ scale_colour_manual(name= "Levels", values = c("TS1"= "black"