{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

3
votes
1answer
49 views

Why are my symbolic x coordinate labels printed twice in a tikz plot?

I'm trying to plot a bar graph, using symbolic x coordinates. For some reason, the name of some symbolic coordinates appears under the x axis more than once. If I increase the width (e.g. 12cm) ...
1
vote
1answer
54 views

Get node text inside filled region in tikz

I have made this figure from this code: \documentclass[tikz]{standalone} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture}[domain=-90:200, x=0.025cm, y=0.15cm] \draw[->,very ...
2
votes
1answer
41 views

How to draw a z-simple paraboloid in a “clean” way

I'd like to draw z=x^2+y^2 on the interval 0<z<9. So normally I've just been using pgfplots with the addplot3 command, and for rectangular domains that doesn't seem to cause too much trouble. ...
2
votes
1answer
43 views

How to plot mark on every nth point?

I have a long CSV data file: x,y1,y2... 1,v1,v1... 2,v2,v2... .... I use pgfplots to plot all the lines. I also want to add mark shapes. But the problem is that the data is too dense, and I have a ...
2
votes
1answer
33 views

pgfplots: change vertical position of node label in addplot

In the MWE below, how can I change the vertical position of the label associated with the curve? For example, if I wanted to put it below the curve? \documentclass{standalone} \usepackage{tikz} ...
4
votes
1answer
80 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 ...
3
votes
1answer
64 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
69 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 ...
5
votes
1answer
73 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 ...
1
vote
0answers
49 views

Tikz spy makes move hyperref links [closed]

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 ...
3
votes
1answer
29 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 ...
2
votes
1answer
35 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 ...
3
votes
1answer
44 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
34 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
1answer
35 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, ...
9
votes
4answers
220 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 ...
0
votes
1answer
27 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 ...
3
votes
1answer
60 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 ...
0
votes
1answer
33 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
17 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} ...
4
votes
1answer
62 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 ...
0
votes
0answers
36 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} ...
1
vote
1answer
65 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): ...
2
votes
1answer
41 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 ...
5
votes
1answer
100 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] ...
7
votes
2answers
200 views

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
44 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
1answer
58 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 ...
3
votes
1answer
42 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. ...
4
votes
1answer
94 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 ...
5
votes
1answer
51 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
53 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 ...
20
votes
3answers
358 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 ...
3
votes
0answers
39 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, ...
6
votes
1answer
113 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
34 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} ...
0
votes
0answers
56 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
2answers
62 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 ...
5
votes
1answer
70 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 ...
4
votes
1answer
87 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 ...
2
votes
1answer
32 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} ...
1
vote
1answer
28 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
3answers
63 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
86 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} ...
1
vote
1answer
52 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
2answers
91 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 ...
1
vote
0answers
18 views

pgfplots: swap x and y axis [duplicate]

I'm looking to swap the x and y axes of a pgfplot (it was generated by matlab2tikz if that makes any difference). I've tried the solution here but it just leaves an empty plot Example of what I want ...
3
votes
1answer
57 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} ...
0
votes
1answer
59 views

Externalize Tikz Figures with Latex

I want to use the externalize option for tikz pictures to save up compilation time. Because of the need for psfrag, I want to compile via latex, i.e. dvi-->ps-->pdf. I use texStudio. My Latex specs ...