Questions tagged [pgfplots]

{pgfplots} is a package for creating 2D and 3D plots of mathematical functions and numerical data, using the PGF graphics framework. For questions about the inbuilt plotting functionality of TikZ/PGF, use {tikz-pgf} instead.

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

Pgfplots and pgfmathparse, lack of precision

I am using pgfplots to draw a graph and I would like to modify the abscissa values of the data when they are plotted. I am currently using x filter/.code={\pgfmathparse{1/#1} \pgfmathresult} to take ...
0
votes
1answer
10 views

PGFPlots - How to override “`no markers`” in `pgfplotsset`

I disabled the markers in my default settings with: \pgfplotsset{every axis/.append style={ label style={font=\small}, tick label style={font=\small}, no ...
0
votes
1answer
74 views

Plotting 3D surface

I'm trying to get my plot as close as this one: CODE: \documentclass[border=5mm]{standalone} \usepackage{pgfplots, filecontents} \begin{filecontents*}{filename.txt} 20 0.01 1.0261 40 0.01 1....
0
votes
0answers
21 views

zero values in multi bar plot

I have this barplot and it already a bit messy. But why are the purple and the violette bars overlapping? \begin{tikzpicture} \begin{axis} [title = Contributions per category at LaTeX-...
1
vote
1answer
21 views

Bar chart vertical alignment and scaling

I'm having problems with the vertical alignment of my bar chart. I started using a single xbar chart for my data, but it looked terrible, since one item is very large and the other very small. So, i ...
0
votes
1answer
37 views

Why does tikz report that my dimensions are too large?

I'm trying to create a figure using Tikz, but it gives me the "Dimensions too large error". I suspect it's because I'm trying to chart functions that approach 0 and 1 in the limits, and Tikz can't ...
1
vote
1answer
103 views

Using ocgx, pgfplots packages to create a clickable pdf file, use in Microsoft Powerpoint?

So using a simple example of a .tex file to get a clickable pdf, I want to then take the pdf image and use it in a powerpoint presentation. So I could be presenting in powerpoint, and click on the ...
0
votes
1answer
61 views

Missing } inserted. in legend refernce. error during 2nd compilation

I am running into the following problem and hope that you can help me as my dead line is just around the corner and suddenly i have got this problem. I am using Texmaker with Miktex and i try to ...
8
votes
1answer
133 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 ...
0
votes
0answers
34 views

I cannot use pgfplots?

I am trying to import pgfplots into my Overleaf latex document, and I suddenly get large number of errors. Are there any alternative methods to generating plots in latex? If not, what are causing ...
0
votes
0answers
26 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}, ...
4
votes
4answers
1k views

stacking negative value for ybar

I would like my ybars to be stacked the same way positively than negatively. It works for positive values but not for negative ones. On the given example, ThirdCol should be stacked negatively. Any ...
1
vote
1answer
685 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 ...
4
votes
0answers
1k views

using gnuplot to plot data from a file

I am trying to plot some data using pgfplots, but the data are so extensive that the maximum capacity is reached. I get the error: TeX capacity exceeded, sorry [main memory size=3000000]. What can I ...
4
votes
1answer
480 views

Extreme pgfplots — Improve 3d polar plot resolution and prevent “TeX capacity exceeded”

So I have this 3d polar plot describing an antenna's radiation pattern, generated with the data exported from the simulation program. The spike in the middle is the main feature of the radiation ...
1
vote
1answer
70 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{...
1
vote
1answer
97 views

Adding a second scale above the figure in pgfplot

Is it possible to add a second scale above the figure on the horizontal axis for the same figure? I want to combine the date with the number of days since a reference date. The illustration should ...
1
vote
1answer
83 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-...
10
votes
1answer
2k views

Adding several labels (year/month) to a graph in pgfplots

I would like to add several labels to a plot in pgfplots: one label for the month and one for the year, just like in this graph: I tried to use the extra tick label, but I don't know how it is ...
4
votes
1answer
1k views

Error in TikZ pgfplots with timestamps on axis

I get the following error message when I try to compile the attached code. I tried everything, but can't find the error. Runaway argument? \pgfplots@calender@ZEROSHIFT \relax \ifx \pgfplotstemptime \...
3
votes
1answer
453 views

Pgfplots: restrict to domain when using date coordinates

I would like to restrict the domain of the x axis while using date coordinates. However, the following example (modified from pgfplots manual) will not compile since the domain boundaries for the ...
3
votes
1answer
2k views

pgfplots: Fixing overlapping X axis labels

I am trying to create a time series plot but my X axis labels overlap: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{width=14cm,compat=newest} \usepgfplotslibrary{dateplot} \...
5
votes
1answer
3k views

Date plot using pgfplots with odd tick label

How do I make the time label in the following image appear as "10:00" (i.e. 10 o'clock) rather than the unexpected and unwelcome "09:60"? Here's the code that I am using: \documentclass{beamer} \...
0
votes
1answer
40 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{...
4
votes
1answer
1k views

How to move axis multiplier in a polar plot in pgfplot

How can I move the axis multiplier in a polar plot? In the following MWE, the axis multiplier is over the ticks and prevent the plot to be nice and readable. \documentclass[crop=true,border=2mm]{...
6
votes
1answer
864 views

Tick labels in pgfplots data time format

I tried to plot a data set containing seconds and milliseconds with pgfplots. I’ve found a solution for my task here (pgfplots data time format), which I changed a bit. This principally works very ...
3
votes
1answer
130 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} \...
0
votes
0answers
52 views

PGFLOTS surface plot broken in past year

I am updating a PGFPLOT surface plot that ran fine last year, but not today. Seems the shader I am/was using may have changed. Here's what it looks like: A partial MWE is as follows: \documentclass[...
2
votes
1answer
44 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:...
2
votes
1answer
607 views

Problem with legend on a 2 y-axis line & ybar figure

I cannot seem to figure out a way to switch the legend symbol to the ybar symbol in a two y-axis plot. Here is a minimal working example of my problem Which yields this: So the only problem with the ...
6
votes
1answer
256 views

pgfplots skip hours

For my current project, I need to display a series of percentage changes in a plot. This is the code I have so far \documentclass[a4paper]{article} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \...
7
votes
1answer
2k views

Plotting time series data

I would like to plot quarterly time series with special x-axis features. In particular, I would like to see small ticks indicating when the quarters begin and larger ticks indicating when the years ...
3
votes
3answers
160 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 ...
2
votes
1answer
824 views

\pgfcalendar@datetojulian error when plotting a time series using pgfplots

I am trying to plot a hyetogram (hourly precipitation vs time, or column 10 vs column 1 in my data file) with data downloaded from a WUnderground weather station. The time column seems to be properly ...
3
votes
1answer
91 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 ...
2
votes
1answer
196 views

Overlap and non-functioning filling in groupplots

I'm trying to place multiple plots in the same figure. In each plot I'd like to have a certain region highlighted. However, there is significant overlap between the plots and the highlighting doesn't ...
1
vote
1answer
1k views

How to draw stacked area chart

I want to plot a stacked area chart. Stacked area chart => All values get stacked and the areas under the lines get's colored. Something like this: My data in a minimalistic example: \documentclass{...
0
votes
1answer
108 views

Can't span width of date plot to linewidth

Aim: Set the width of a plot to \linewidth. Current Status: Setting the width option of the axis environment to \linewidth yields the Dimension too large. error. And indeed, in the resulting ...
1
vote
2answers
327 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 ...
1
vote
1answer
32 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{...
1
vote
1answer
218 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 ...
3
votes
1answer
72 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} \...
3
votes
0answers
214 views

Pgfplots: Draw time-series without missing data

I have time-series data which I want to draw with pgfplots. The data only covers weekdays, thus no weekends. Still pgfplots inserts new ticks for datapoints having essentially no data, this results in ...
2
votes
0answers
257 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 ...
0
votes
1answer
29 views

Setting the subfigures horizontally in pgfplots

Figures are plotted vertically but i want to set them horizontally. Kindly guide me the possible options. \documentclass[conference]{IEEEtran} \ifCLASSINFOpdf \else \fi \hyphenation{op-tical net-...
1
vote
1answer
71 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 ...
1
vote
1answer
140 views

Include negative value in sum/total value in stacked bar chart

I have a stacked bar chart that looks like this. However, I'm trying to include the negative values (ninth column in the datatable) into the total value on the stacked bar chart so that in the end ...
1
vote
1answer
522 views

y-bar, symbolic x-coords not showing up

I'm trying to produce a y bar plot, that sometimes has data and sometimes doesn't. Yet, it has two plots and needs to get them right next to each other. Here is as close as I was able to get: As you ...
1
vote
1answer
145 views

Stacked bar chart, nodes near coords remove small values and show sum

I know it is possible to have only the sum shown on top of the bar chart and remove the other values in the stacked bar chart (as shown in picture attached), but I can't figure out what went wrong in ...
8
votes
2answers
600 views

PGFPLOTS Marginal Histogram with date data

I took Jake's code from Scatterplot with Marginal Histograms and ran into a problem with trying to histogram date data on the x axis. The scatterplot and y axis histogram work well, revealing: The ...