Skip to main content

Questions tagged [dateplot]

{dateplot} refers to plots where the input coordinates are given by dates.

Filter by
Sorted by
Tagged with
0 votes
1 answer
137 views

Manually formatting date tick labels using pgfplots

I want to make the plots in PGF/TikZ for my publications. I need to format the date ticks manually (see example from Matplotlib documentation). I define a start date (xmin) and an end date (xmax); in ...
lastdigitalfish's user avatar
0 votes
1 answer
78 views

Plot data from CSV, move points apart, formatted xlabels from data column, shifted grid

I have been gathering data from hygrometers for several weeks, observing their drift. Now I want to plot the data. This is my first attempt and how the data looks like (I hope this is working, I ...
ehwlt's user avatar
  • 3
0 votes
1 answer
136 views

Get y value of linear regression plot at xmax

I'm creating a dynamic LaTeX (LuaLaTeX) script, which is creating a plot out of a given CSV file. Settings like xmin, xmax etc. depend on that CSV file. That CSV file contains the storage utilization ...
grossmaul's user avatar
1 vote
1 answer
73 views

pgftools coordinate date issues in addplot

I don't understand the place of the rectangle : I was thinging that I must start after the red line I seem to be 24hours in past. red line abciss is axis cs:2021-06-03 00:00 rectangle begin at axis cs:...
flav's user avatar
  • 4,782
0 votes
1 answer
691 views

PGFPLOTS: plot with dates on x-axis?

I'm trying to create a simple plot from a csv file similar to: date,anumber 01/09/2021,123 ... I copied a bit of code from the web: \documentclass[10pt,a4paper]{article} \usepackage[a4paper,margin=0....
j4nd3r53n's user avatar
  • 509
0 votes
0 answers
147 views

Pgfplots: I cant include any libraries using \usepgfplotslibrary -> Dateplot not possible

I am new here and appreciate any help given. I am working on Windows 10 with TeXStudio and Miktex 2.9. My pgfplots Version is 1.17. My example code looks like this: \documentclass[a4paper,12pt,...
Carl's user avatar
  • 1
1 vote
1 answer
178 views

pgfplots: put a tick each first day of a month with abbreviated month name

I'm trying to get a plot with xticks with the first day of the month, as in this question and using abbreviated month names, as it is done here. This is what I've tried: \documentclass{standalone} \...
kmundnic's user avatar
  • 227
7 votes
2 answers
490 views

How to change name of month in dateplot?

I produce the following chart: I urgently need to change the month names to Malay, and since there's no package for it, I need to do it manually. In this case, change May to Mei (Mar = Mac, Aug = ...
Thev's user avatar
  • 1,578
-1 votes
1 answer
76 views

Mark areas in stacked bar plot

I am trying to create a stacked bar plot while marking (connected) parts of it. The axis cs approach seems to work in this case, but there are two problems which I am facing: The outline is mostly ...
epR8GaYuh's user avatar
  • 2,422
6 votes
2 answers
700 views

Labels for Every Nth Date in Pgfplots

I want to create a graph with dates on the x-axis. I started with the dateplot library in pgfplots. I want date labels only for every third date, e.g., March 4, March 7, March 10, etc., but I can't ...
bclzyjhr's user avatar
  • 447
0 votes
2 answers
148 views

Minute display error How to create a date and time plot with TikZ and pgfplots

I used the solution posted previously to create a plot with time in the x-axis. However, the plot only displays the right hour, while the minutes are always 00. Does anyone has any ideas? Thank you! ...
Nina's user avatar
  • 11
1 vote
1 answer
268 views

How to plot date axis with pgfplots?

I have the following code, which builds in part off the answer here. \documentclass{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepgfplotslibrary{dateplot} \pgfplotsset{compat=1.8} ...
Thev's user avatar
  • 1,578
0 votes
1 answer
344 views

import times from txt: "File ended while scanning use of \pgfplotslibdateplot@map@time."

i have a problem using a time axis and imported data from a txt file. \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{dateplot, statistics} \pgfplotsset{compat=...
jan_7146754's user avatar
1 vote
1 answer
74 views

Points plotted backward when specifying xticks

I ran into a weird issue when plotting a time-series. In the first plot, everything works fine. In the second plot, however, the points before the first xtick seem to be plotted backwards. What am I ...
Claudio's user avatar
  • 2,017
3 votes
0 answers
130 views

Colormaps within group plots with date coordinates in pgfplots

I am having issues when using colormaps within group plots that have date coordinates in x. \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{groupplots} \usepgfplotslibrary{...
Claudio's user avatar
  • 2,017
1 vote
1 answer
73 views

pgfplots: How to align dateplot with two x axis?

Assumed we have this Minimum Working Example (MWE) to display a dateplot with two completely identical x axis, but with different xtick positions: \documentclass{standalone} \usepackage{pgfplots} \...
Dave's user avatar
  • 3,778
1 vote
1 answer
147 views

pgfplots dateplot: how to add best fit line

This is my plot: I would like to add the best fit line in correspondence with the first straight section (from 16:23 to 16:33). The equation of the line is y = 0.022x + 19.018. This is my attempt \...
user3204810's user avatar
  • 1,539
2 votes
1 answer
160 views

pgfplots: Change names of weekdays to German language?

The user Torbjørn T. has posted a nice approach on how to display the names of the days of the week in dateplots. Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots} \...
Dave's user avatar
  • 3,778
3 votes
1 answer
246 views

pgfplots: How to add names of the days of the week to dateplot?

Assumed we have the following code: Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots} \usepackage{filecontents} \usepgfplotslibrary{dateplot} \begin{filecontents}{data....
Dave's user avatar
  • 3,778
2 votes
1 answer
310 views

pgfplots: Difference between "xmin" and "date ZERO" when using dateplot?

Assumed we have the following code: Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots} \usepackage{filecontents} \usepgfplotslibrary{dateplot} \begin{filecontents}{data....
Dave's user avatar
  • 3,778
4 votes
1 answer
762 views

pgfplots: How to set xticklabel date year as YY instead of YYYY?

By default, xticklabel = \month/\year, will be displayed as 04/2019. However, I want to display it as 04/19 instead of 04/2019. Minimum Working Example (MWE): \documentclass{standalone} \usepackage{...
Dave's user avatar
  • 3,778
3 votes
1 answer
2k views

pgfplots: How to set xticklabel as two line?

I want to design xticklabels as two line texts: First line: Date, e.g. \month/\day Second line: Time, e.g. \hour:\minute Minimum Working Example (MWE): \documentclass{standalone} \usepackage{...
Dave's user avatar
  • 3,778
1 vote
1 answer
479 views

pgfplots: How to force datetime to only display xticks with even times (18:00) instead of odd times (18:34)?

Assumed we have the following plot from user darthbith to display a pgfplot with a time axis: Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{...
Dave's user avatar
  • 3,778
1 vote
1 answer
563 views

Specify times and dates in Pgfplots

I have x-data as dates associated with float values; plotting them with pgfplots is as easy as \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{dateplot} \pgfplotsset{compat=...
Nico Schlömer's user avatar
1 vote
1 answer
154 views

using axis xtick from variable

I've been trying to create a macro that I can use to plot data using pgfplots and I want control over where ticks go and the label used, but I can't figure out why things aren't behaving as I expect. ...
Sam Mason's user avatar
  • 782
4 votes
1 answer
53 views

Problem with time format on x-as not displaying correctly

I've made a 24 hour graphic (with different y-axes). So far so good. But the x-axe is not displaying as I wanted. 1/ the time is not displayed correctly 05:59:00 instead of 06:00:00 2/ the x-axe ...
Arne Timperman's user avatar
1 vote
1 answer
464 views

pgfplot with timestamp in microseconds

My example as below: \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{dateplot} \begin{filecontents*}{data.csv} (10-18-2018 16:50:27.871,0) (10-18-2018 16:50:27.888,8) (10-18-...
lucky1928's user avatar
  • 4,275
2 votes
1 answer
68 views

Filled area behind bar plot from table data

I have the following MWE where I want to place the data from file myintervals.csv as filled area behind my bar plot. There is a problem with expandable macro here, but I don't get it working correctly:...
Reza's user avatar
  • 1,798
1 vote
1 answer
871 views

pgfplots: modify axis after end axis / cut tikzpicture after drawing

I'm using pgfplots to draw data from csv files. For each line in the csv file, I'm adding a node (which possibly contains multiple lines of text) while keeping track of the y position. That means, I ...
Bastian's user avatar
  • 11
0 votes
1 answer
240 views

How to specify xtick={<>} when using x-coordinate in DATE-format and not using [date coordinates in = x]?

Depending on this question how to plot regression on DATE x-axes I post the MWE from Christian Feuersänger: \documentclass{minimal} \usepackage{pgfplots} \usepgfplotslibrary{dateplot} \begin{...
SRel's user avatar
  • 1,343
8 votes
1 answer
373 views

Making pgfplots parse times (or whatever)

Most likely this is trivial for those with some experience in all these expansion issues, but I have a simple question concerning pgfplots. I want to modify its parsing behavior a bit. (Yes, I am ...
user avatar
0 votes
1 answer
63 views

Only one point visible with pgfplots

I am trying to display multiple plots with pgfplots, but only one point is displayed (with a lot of overlapping) : And the latex : \documentclass{article} \usepackage{pgfplots} \pgfplotsset{width=...
Benoit Sepe's user avatar
1 vote
1 answer
143 views

Show x-labels as time every two hours with pgfplots{dateplot}

I'm trying to plot a simple graph from .csv. I'm using the answer of https://tex.stackexchange.com/a/83929/164280 as basis. I get a could not parse input '00:00:00' as floating point error. I do want ...
Hans's user avatar
  • 491
3 votes
1 answer
208 views

Problem to plot data with dates using an external file

Using logs to make statistics, I have a large number of data which contains two columns, like this (dd-mm-aaaa hh-mm float) 27-04-2018 04:43 7.78269552 27-04-2018 04:44 7.901522832 27-04-2018 ...
Hugo Vernier-Lambert's user avatar
2 votes
1 answer
133 views

How to have a date axis and a "normal" one linked on a plot?

I am plotting some date-based data with pgfplots where the date is on the x axis, which works so far (see MWE below). However, I would like to have a second x axis which is linked to the first one ...
Benedikt Bauer's user avatar
2 votes
1 answer
242 views

PGFplot is not accepting date time file as input

I tried to read a file with time and date on x axis but it gives an error as "could not parse input "00:00:19" as floating point number" I saved the excel file with "tab delimited" extension. I also ...
Tayyaba Liaqat's user avatar
4 votes
3 answers
399 views

Latex PGFPLOTS: Set value between ticks

I am trying to plot the outside temperature of a city of an average year. Therefore, I want the values (month of year) to be in between the xtick lines, and not on the line. Can somebody help me with ...
JvR's user avatar
  • 41
0 votes
0 answers
31 views

Name nodes of addplot from the third column [duplicate]

I have the following code \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{dateplot} \begin{figure} \begin{tikzpicture} \begin{axis}[ height=9cm, width=10cm, title={title}, ...
com's user avatar
  • 135
1 vote
1 answer
451 views

Dateplot doesn't work if xmin/xmax are specified

Here is a simple datafile data.csv: Time,Value "2017-01-31 12:51:05",500 "2017-01-31 12:51:05",820 "2017-01-31 13:48:14",820 "2017-01-31 13:48:14",500 Here is a simple plot of it: \documentclass[...
Fatalize's user avatar
  • 197
3 votes
1 answer
875 views

pgfplots, dateplot: how to obtain xtick at given dates?

the following mwe: \documentclass[margin=3mm]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{dateplot} \pgfplotsset{compat=1.15} \usepackage{filecontents} \begin{filecontents*}{data.csv} ...
Zarko's user avatar
  • 300k
1 vote
1 answer
3k views

Pgfplots axis x line = bottom changes plot content

I'd like to disable the top border of the plot. To do so, I used axis x line = bottom. However, this changed the plots content (the left most and right most bar are now hidden). How can I achieve this ...
Klaus Stadler's user avatar
3 votes
1 answer
107 views

Filling space under curve in a plot with date coordinates

How can I fill the space between the curves underneath the lines. The red filling should go to y=120, the green to y=80. And only if the datapoints are over this values. \documentclass{scrartcl} \...
simande's user avatar
  • 1,022
3 votes
1 answer
275 views

add extra label to pgfplot picture

I want to add the beginning and end label as extra label to a pgfplot. example as below: \documentclass[border=2mm]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{dateplot} \begin{document} \...
lucky1928's user avatar
  • 4,275
1 vote
1 answer
272 views

How to shade regions corresponding to particular periods of time

I need to plot time data and shade some periods of times like in this graph Is it posible using tikz? Thank you very much Sorry. I forgot to include my figure. Unfortunately "\filldraw[fill=gray!...
Marcos's user avatar
  • 13
1 vote
2 answers
641 views

pgfplot with date and automatically calculated mean

I have a pgfplot with dates for x and some values for y, for which I now want to add a mean line like it is done here. The function \DrawHMean presented there however seems to have a problem with ...
dessert's user avatar
  • 568
5 votes
1 answer
836 views

Linear regression with dates on x axis in pgfplots

As in this question, I need to add a linear regression line to a plot which has dates on the x axis, but I get following error: ! Package PGF Math Error: Could not parse input '2017-01-01' as a ...
Luigi's user avatar
  • 6,325
5 votes
2 answers
737 views

pgfplots: put a tick each first day of a month

I have a dateplot and I need to put a tick each first (or n-th) day of a month programmatically. I set up the following mwe which doesn't work: \documentclass{standalone} \usepackage{pgfplots} \...
Luigi's user avatar
  • 6,325
2 votes
0 answers
399 views

Plot time series with PGFPlots and GNUPlot [closed]

I am trying to plot a large time series using PGFPlots, but it takes ages and often crashes with memory error, so I thought to use GNUPlot. This works fine with the same data but with simple ...
Claudio's user avatar
  • 2,017
1 vote
1 answer
774 views

Change periods on x-axis in time series? [duplicate]

I want my graph to only show the following time periods 1986, 1992, 1998, 2004, 2010, 2016, instead of the ones shown in the graph. Someone knows a solution? Thanks! The data in .dat-file is in the ...
Name's user avatar
  • 11
1 vote
1 answer
81 views

No Line Plotted

Minimum - not working - example: \documentclass[letterpaper]{article} \usepackage{pgfplots,tikz} \usepgfplotslibrary{dateplot} \usepackage[margin=0.5in]{geometry} \pgfplotsset{compat=1.11} \begin{...
user39678's user avatar
  • 391