{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.

learn more… | top users | synonyms

1
vote
1answer
42 views

LaTeX Compilation & Memory Question

Good Day, I'll explain my situation for reference before I dive into the question. I am writing a fairly lengthy report in LaTeX. The report will probably end up being over 60 pages and have ...
2
votes
1answer
47 views

How does PGFplots calculate trig functions?

In plotting the graph from my last question I have discovered that the plots I'm getting from PGFplots are not entirely correct. I was attempting to plot (4.9/(w^2))*(cosh(w*x)-cos(w*x)) for multiple ...
4
votes
1answer
58 views

How to compute and show new value from linear regression

The following MWE shows a template I use in university to show calibration data and the corresponding linear regression. Now I was asking if I can compute an $X$-value for a given $Y$-value and show ...
3
votes
1answer
48 views

A question about ticks on a graph

I am trying to make a graph with a grid in the background. I want it to be standard windows size, but I only want numbers next to the -10 and 10 on both the x axis and y axis. I am using this code ...
6
votes
1answer
95 views
+100

Hide specific ybar when no used (no values) in pgfplots

I am trying to plot the results of a survey. However, I want to turn one bar (the no answer) on and off according to the results. That is, if there is no empty answers, there is no need to show it. ...
3
votes
1answer
33 views

Adding manually a grid to a .tikz file generated by matlab2tikz

I asked this question here Stackoverflow Now, I know of the existence of the problem with the conversion with the matlab2tikz script and the inclusion of a grid. GridProb How can I manually add a ...
5
votes
1answer
36 views

Option for Coloring the Background of pgfplots

I have been looking for a simple answer for this with no success. I want to plot the function y=x^2, and color the background of the whole box made up by the axis environment. Intuitively, one would ...
6
votes
4answers
144 views

How to point an equation to a curve

I have the following code: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.7} \begin{document} \begin{tikzpicture}[>=latex] \begin{axis}[grid=both, axis x ...
3
votes
1answer
18 views

pgfplots bar plot number format

I was just trying to compile some data into a bar chart using pgfplots. Things seem to work apart from the following: The annotation for the bars has low precision, i.e. only 3 decimals, it is shown ...
1
vote
0answers
34 views

Tikz spy makes move hyperref links

I have some troubles with the Tikz library spy. When I use the spy, it creates a new hyperref link at a new position. Thus there is 2 links where only one is wanted (see the image with 2 cyan box ...
2
votes
1answer
26 views

Problem connecting nodes from and axis environment and using /tikz/scale

Consider this almost-MWE: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots}\pgfplotsset{compat=1.9} \begin{document} \begin{tikzpicture}[] \begin{axis}[clip=false, width=12cm, ...
2
votes
1answer
31 views

Duplicate values when writing value near coordinate

I am using this code, taken from my question here. The problem arises when two x values have the same y value. Then the label I want to write near the coordinate overlaps with the other one. How can I ...
15
votes
3answers
2k views

PGFPlot - Missing values in table data

I am using PGFPlot with external table data. However, some values are missing for some plots. This causes data in column 2 does not exists error. Is there a way to solve this. The value does not ...
3
votes
1answer
37 views

Write a value near a coordinate in a plot

I want to do it from a file, rather from inside the document like I do it now: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} \begin{tikzpicture} ...
2
votes
0answers
21 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} ...
2
votes
2answers
66 views

Unable to typeset LaTeX maths characters in pgfplotstable table header

I am typsetting a simple table with pgfplotstable and attempting to include units in the headers. I've noticed that certain math macros e.g. \circ or \gamma (2 random test cases) fail to typeset. When ...
0
votes
1answer
19 views

pstool + pgfplots/tikz + parskip conflict resolved

A while back a question about a conflict between pstool, pgfplots and parskip packages was asked. I came across a similar problem using the pstool, tikz and parskip packages in concert, and happened ...
2
votes
1answer
61 views

How to plot with TiKz the following performance?

I would like to plot some percentages as lines. So I tried the following: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \begin{document} \begin{tikzpicture} ...
6
votes
1answer
266 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 ...
0
votes
0answers
20 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
0answers
15 views

How to adjust one 'meta' label position in pgfplots when it overlays with another?

My MWE: \documentclass[12pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \usepackage{amsmath} \usepackage{mathspec} \setmainfont[Ligatures=TeX]{Times New Roman} ...
1
vote
1answer
37 views

Simple import of data with special characters for table

I'm currently trying to import a set of data from a file (comma or tabbed delimited, doesn't matter) for creating a table. Below is an example of this data (DH parameters in case you're curious): ...
4
votes
1answer
53 views

Shade around curve in pgfplots

I am using the pgfplots package to make a plot of my data. As you can see in the plot below, I've got quite some data points which makes it hard to see the fit, so I decided to use a shade around the ...
2
votes
1answer
25 views

How to change the mark in a pgfplots boxplot

I have my own custom style for boxplots which I like very much. I like it so much I would like to use it everywhere. I used it with the old boxplots, and it did everything I wanted. However, the ...
2
votes
1answer
73 views

Pgfplots: Placing legends individually to the end of lines

I have a few days of experience with LaTeX. It seems almost everything is possible if you just find out how. So, here is a challenge... If a plot has many lines it is much more readable to have ...
19
votes
3answers
320 views

Plotting a graph with several values of a parameter

I'm trying to plot the function q(t) = (4.9/ (w^2))*(cosh(w*t)-cos(w*t)) for several values of the parameter w. That is, I want to plot whole graphs of q vs t, where I plug in say w=1, w=2, w=100, or ...
0
votes
0answers
25 views

pgfplots axis label positions change unexpectedly

I want the axis labels to appear at the ends of the axes -- the arrows should "point" to them. They are correct in this MWE: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} ...
2
votes
0answers
67 views

Draw the plane x+y=1 in three dimensions in pgfplots

I want to draw the plane x+y=1 in pgfplots. In this example, z is free and is not explicitly a function of x and y. So I cannot use \addplot3[surf, fill=blue, opacity=0.1, fill opacity=0.4] ...
3
votes
1answer
41 views

pgfplots Producing Incorrect Plot

Why is this not working properly: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[xmin = 0,xmax= 1,ylabel = $C_A/C_A^*$,xlabel=$z$] ...
2
votes
0answers
70 views

Plot data and the mean of each column

I have a data file which looks like this: 1 256 2 197 3 190 4 188 5 219 6 169 7 179 8 181 9 182 10 178 where the first column are timesteps and the second column contains the ...
4
votes
1answer
81 views

I am trying to assemble a picture with four png pictures

I would like to assemble the following four pictures in a 2x2 matrix (filling rows first): Is there a possibility to put the letters A-D at the bottom left of each figure to label them? Thank ...
3
votes
1answer
36 views

How to add one mark to one line in pdfplot

I am attempting to differentiate each line in the graph. Then I try to use marks, however it looks messy. Is there a way to make it looks more tidy? I am open to any suggestion that works. ...
5
votes
1answer
47 views

I am trying to extend the regression line

I have the following code: \documentclass{standalone} \usepackage{pgfplotstable} \pgfplotsset{width=12cm,compat=1.9} \usepackage{filecontents} \begin{filecontents*}{all_women.csv} a,b ...
4
votes
1answer
45 views

Change colors of several pgfplots functions plotted in foreach gradually

In answering this question I actually caught myself unknowing how to solve the following issue. In the code below I'm dealing with many graphs, which I intend to gradually change in color based on ...
3
votes
0answers
30 views

pgfplot - how to make horizontal error bars

Hello I would like to add horizontal error bars to my plot, that's picture is below. There is code of my plot \begin{tikzpicture}[thick,scale=1, every node/.style={transform shape},trim axis left, ...
4
votes
1answer
95 views

pgfplots + gnuplot: why does setting clip = false in axis options completely ruin graphs of implicit functions?

Here's a MWE: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[xmin = 0, xmax = 1.5, ymin = 0, ymax = 6.2831853072, ...
6
votes
1answer
93 views

Drawing an intersection of two equations in 3D

I'm trying to draw the intersection of the following two equations: x^2+y^2=4 (a circle of radius 2) and z=x+4. I got kind of close with tikz-3dplot (which has preferrable output in my opinion), but ...
3
votes
0answers
30 views

Making axes line up

I'm working on the following graphic: I would like the y axis of the plot in the upper right corner to line up exactly (i.e. have the ticks line up) with the x axis of the rotated plot to its left. ...
1
vote
0answers
19 views

Draw line across axis environments [duplicate]

I have placed a plot below another plot in pgfplots. The two plots reside in a separate axisenvironment each, like so: \documentclass{scrartcl} \usepackage{pgfplots} \pgfplotsset{compat=1.12} ...
4
votes
0answers
56 views

cb range problem

I would like to ask you about an advice in some specific problem with pgfplots routine. I tried to search any information on the internet, however with no satisfy reasults and that is the reason, why ...
1
vote
2answers
53 views

yticklabel pos=right has no effect

I am using pgfplots to draw a simple 2D function. I'd like to display all of the ytick labels on the right side of the plot. So far I had no success using yticklabel pos=right, I do not get an error ...
4
votes
2answers
39 views

Scaling a plot axis to keep the same size unit vectors over multiple plots

I have a PGFplots set of grouped plots that somewhat resembles the following MWE. The top row of plots has a larger range than the bottom row. Is there a way to have the height of the top row ...
0
votes
0answers
47 views

Creating a generic Asset Life curve in Latex

Good afternoon all, I need to ask another question today in a slightly different format. I am trying to create a figure that resembles the one below and I would like some help regarding the ...
1
vote
1answer
42 views

How to arrange the key in this plot?

basically I have plot like this: It looks bad because two reasons: The middle figure, five keys are overlapped with lines The 6 key in the third figure, even they are not overlapped, they are not ...
2
votes
3answers
60 views

Text beneath two function graphics inside of a figure

Is there a way to put extra text under some function plots in the following code? I need them to appear side by side on the page in the same figure and I do not what to use an extra caption. The text ...
2
votes
1answer
27 views

Using pictures / images as x-axis label in pgfplot?

is it somehow possible to use external pictures as explicit labels in pgfplot? Or can I use the draw environment within the label definition? I tried it in two ways: \begin{tikzpicture} ...
2
votes
0answers
42 views

Adjusting 3D-view in pgfplots by custom transformation matrix for multiple axes

I'm trying to overlay two axis environments in a tikzpicture for adjustable views. In principle this wouldn't be a big deal - but, I would like to use this technique for the projection e.g. of text ...
1
vote
1answer
26 views

pgfplots ignores “thick” option for axes

I'm having a problem with the following code \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} ...
2
votes
1answer
72 views

How to add subtitles to a group of plots?

I have the following group of plots: \documentclass{article} \usepackage{fullpage} \usepackage{pgfplots} \usepgfplotslibrary{groupplots} \pgfplotsset{compat=1.12} \begin{document} ...
3
votes
1answer
52 views

Specifying markers in tikzpicture

I have the following chart...the below code won't build without the data files, but an image follows \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{figure} ...