{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
0answers
11 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
30 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
35 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
16 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
24 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, ...
6
votes
4answers
123 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
17 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 ...
1
vote
0answers
24 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
0answers
19 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
13 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
50 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
23 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
33 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
23 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
0answers
64 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] ...
6
votes
0answers
58 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
37 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$] ...
0
votes
0answers
33 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
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. ...
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 ...
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
44 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 ...
18
votes
3answers
301 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
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, ...
6
votes
1answer
92 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
29 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
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
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
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 ...
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 ...
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} ...
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
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
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} ...
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
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 ...
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
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} ...
0
votes
1answer
51 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 ...
4
votes
2answers
38 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 ...
3
votes
1answer
36 views

Changing global settings for makers doesn't work in pgfplots

Often I have documents where I need plots without makers. In this case I set globally a \pgfplotsset{ no markers } However if I have some special plots in the file which require (only) ...
5
votes
1answer
89 views

Pgfplots: plot text along function

I want to illustrate a material model, especially the identical loading and unloading path, which are illustrated via arrows that follow the material model in the following picture. I want to put ...
0
votes
0answers
41 views

Plot the sum of two inverse normal CDFs in three dimensions

I am interested in plotting the sum of two inverse cumulative normal distributions in pgfplots but I am not quite sure how this can be done. Could you please lend me a helping hand here? Thank you in ...
1
vote
1answer
23 views

Multiline legend external to pgfplot

I'm building a plot with pgfplots where there's no good location inside the chart box for a legend, so I'm trying to place the legend outside. Below is the code...it obviously won't build without all ...
3
votes
1answer
56 views

How to plot the maximum and the minimum

I am interested in drawing the minimum and the maximum of two variables, i.e. min(x,y) or max(x,y). The way I was going about doing it so far was to get the contour plots using gnuplot but my attempts ...
4
votes
1answer
40 views

Label each row of plots in groupplots (pgfplots)

I am using groupplots to display 12 plots in 2 columns and 6 rows. The two plots in each row are related to some method, and I want to specify the method name in the title. The problem is, that ...
2
votes
1answer
41 views

Default tikz arrow style in pgfplots

I'm trying to change the axis arrow style used in pgfplotsto the default one obtained in tikzusing ->, i. e. I've done some research but can't seem to find a way to do that.
1
vote
1answer
22 views

pgfplot bar chart with no X labels?

Is it possible to produce a bar chart in pgfplots with no X labels? I'd like to simply fill the bars and have an external legend that provides a color code. I'm making a 3x1 group plot that shows ...
3
votes
2answers
99 views

Vertically stacked group plot with different horizontal scaling

I've 4 data sets that I'd like to present as a stack using pgfplots' groupplot library. What I'm struggling with is that the first data set has a larger horizontal range to the remaining three. I'd ...