{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

2
votes
0answers
51 views

Bar graph with elements from the document

In my document, I define some elements which all have a number (from 1 for the first to n for the last one) and a level (1, 2 or 3). At the end of the document, I'd like to create a bar-graph with ...
2
votes
1answer
63 views

pgfplots: macro to draw lines from point to y-axis

After reading pgfplots: help with macro to drop line to x-axis, I was wondering if I could do the same thing but with a line connecting the point with its y-axis projection. So I tried to modify the ...
2
votes
0answers
85 views

How to create a checkerboard tile pattern in pgfplot tikz

I am aware of several patterns available in tikz patterns, such as vertical lines, crosshatch and etc. However, I need to create some tile pattern similar to that of checkerboard pattern in order to ...
2
votes
1answer
55 views

Pgfplots: Scope inside axis environment or other relative positioning

I want to place an external figure inside a pgfplots plot. Additionally, I want to put some labels inside the external figure to mark the position. The expected result should look something like this:...
0
votes
1answer
53 views

Change direction of tikz pgfplot colormap

i want to change the direction of the colormap of a scatterplot. The "best" points in my plot are in the lower right, the "worst" in the upper left. So it would be nice, if the points in the lower ...
4
votes
1answer
88 views

Plotting ranges of data with tikz or pgfplots

I have a sample with countries and data. I would like to have a "comb" graph to show the years covered in the sample for each country. My data is like this : ####################################...
2
votes
2answers
93 views

How to use colors from a pgfplots colormap in pie chart?

I like the pie chart from http://www.texample.net/tikz/examples/pie-chart/, but it's in grey color. Then I found the modified version to add colors by "Sigur" here:How to give different color to each ...
3
votes
0answers
238 views

Coordinate Transformation for labeling with PGF-Plot

Difficulty with drawing the right coordinates I use pgfplots to draw a set of data points, fit them with gnuplot and then find the intersection points between the linear fits and a vertical bar. Now ...
1
vote
1answer
64 views

How to make the axis of the same?

How can I reproduce the top picture? Here's what I have so far: \begin{tikzpicture} \begin{axis}[xticklabel style={anchor=east,rotate=90}, date coordinates in=x, xticklabel={\day.\month.\...
2
votes
1answer
53 views

How to increase the thickness of the graph lines and remove the point?

It is necessary to remove the round and square dots on the graphs lines. And to increase the thickness of the line. \begin{tikzpicture} \begin{axis}[date coordinates in = x, table/col sep = ...
2
votes
1answer
151 views

How to turn 90 degrees to the axis of the date?

Rotate 90 degrees date. How to implement this?
3
votes
1answer
13 views

Use one axis' limit values in another axis

I'm working on a pgfplots source that plots a (dynamic) data file with different scale of the parallel axis. This is easy when you know the axis/data range in advance, but what if the range of axis/...
1
vote
1answer
34 views

Horizontal lines in dataplot

I want to add only horizontal help lines in my plot and not a grid. So I decided to add lines with \draw[very thin] but somehow these lines are different from each other. I want them to be all the ...
2
votes
1answer
61 views

lighter mesh grid line (faceted) color

For certain colormaps, the mesh grid line color is too dark. I would like to make it less dark. However not a fixed color as set with faceted color=blue,. My approach was to adjust the opacity as in ...
2
votes
0answers
30 views

Mark local maximum and calculate gradient in PGFplots

I'm using data from a tensometer to generate a stress-strain curve, but I want to find the yield point and the gradient between the start of testing and that point to calculate Young's modulus. Can ...
4
votes
1answer
35 views

Pgfplots bar chart with \times symbol as multiplier

I have a bar chart with relatively large values and I am using the near coords option to show the values over the bars. I want the \times symbol instead of \cdot for pgfplots multiplier. I know how to ...
1
vote
1answer
45 views

pgfplot: plot non-numerical data from CSV file [duplicate]

I have a csv file like: column1,column2 string1,value1 string2,value2 … Values are integers, strings are alphanumeric. I tried to plot it, with strings on x axis and values on y axis. After some ...
1
vote
0answers
14 views

pgfplot connects first and last point of line in the surf plot [duplicate]

I'm plotting a surface from data file arranged in columns x,y and value. The result looks like this: As you can see, first and last point of every line is connected. Relevant code: \begin{...
5
votes
2answers
70 views

Using Separate Serif and SansSerif Fonts in a Document

I have a bunch of figures that I am compiling using the standalone class in which I load two font packages mathpazo for the serif fonts and cabin for the sans serif fonts. The problem is that when I ...
2
votes
1answer
51 views

Spy glasses in a group plot

I have a group plot in which the graphs have common x axis and are stacked one over the other- like the one givenhere. Now, I want to have a spy glass on each of these plots in the group. But when I ...
1
vote
1answer
55 views

PgfPlots - Plot semilogx of a matched filter

I tried to plot a frequency response of a matched filter, which its response defined by: H(f) = Since x (=f) runs from very big negative value to very big positive value, and y (=H(f)) runs only ...
4
votes
2answers
67 views

Make a smoother plot of functions with pgfplots

The following code gives me a plot which is not very smooth. It looks like several points (with spacing 0.5 in the horizontal direction) are drawn first and then connected by straight lines. What ...
1
vote
0answers
25 views

Large data in pgfplots. Error exceeds memory?

Good evening. I am trying to include a sismo signal in my homeworking, it has 8,000 points. Is it possible to work in pgfplots? This is the error: ./Tarea 3.tex:266: TeX capacity exceeded, sorry [...
1
vote
1answer
22 views

Tikz: Square all y values in plot [duplicate]

I have a tikz file that contains a table. Can I tell tikz to square all $y$-values before plotting? That is, I want the entry $(2,3)$ to be plotted at $(2,9)$, without changing all entries in the ...
3
votes
1answer
60 views

How to join the points from an external file with smooth lines in tikz

I am working on plotting data from an external file. When I use the following code I get the points in the curve joined with lines, however I would like to join them using smooth curves. \begin{...
1
vote
0answers
31 views

tikz figure input line width from file

I would like to create a figure with different line plots, where I input the coordinates of the lines from a file. I would like to also input the width of each line from another file. is this possible?...
3
votes
1answer
23 views

pgfplots extra y tick formatting

In the MWE below I'd like to know to format the drawing such that the extra y tick is formatted with two decimals, but the rest with just one decimal Why doesn't it print zero? Zero should not be ...
2
votes
1answer
54 views

PGFPlots: Shift the entire axis environment to the right

I would like to plot two separate data files in two separate axis environments so that they are placed right next to each other. They will be part of the same subfigure, so I think I need to shift the ...
3
votes
1answer
53 views

adjustbox missing endgroup inserted. How to fit longtable to page width?

I am working on my thesis. The appendix contains 2 large tables that span multiple pages. These tables are wider than the page height in landscape mode. When using the \begin{adjustbox}{width = 1\...
1
vote
0answers
33 views

Grouped Stacked Plot in Pgfplots

I have a table like that (quotation marks stand for float point numbers between 0 and 1): And I would like to use pgfplots to make this plot (a grouped stacked bar plot): Note that: - There are ...
4
votes
1answer
109 views

PGFPlots — a solid of revolution as a 2D-plot

I'm trying to draw something like this: And I probably should use a 3D-plot as shown here but it seems to be an overkill solution in my case. So I wonder if there is a better way to draw ellipses ...
3
votes
2answers
79 views

PGFPlots graph is truncated, top is cut off

I'm trying to use pgfplots to plot a Maxwell-Boltzmann curve. After scouring around the internet for the density function, I've come up with this: \begin{tikzpicture} \def\kB{1.3806488e-23}% ...
7
votes
0answers
65 views

pgfplot error with mathematical equation [duplicate]

I'm new to this site and I'm searching for the help. I'm trying to plot an adsorption isotherm described with specific equation. I used pgfplots package with following commands: \documentclass{...
3
votes
2answers
67 views

pgfplots adding unwanted dashed lines

I'm using pgfplots to plot multiple lines, but after a certain number of lines, they seem to revert to dashed lines regardless of line style. Is there a way to fix this? The code to generate the ...
2
votes
1answer
59 views

How to clipping between two curves?

I have to fill between two curves like this photo \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{patterns,calc,positioning,shapes} \pgfplotsset{compat=1.10} \...
3
votes
1answer
64 views

Missing xtick labels from table in bar plot whenever y value is nan

Given a picture like that: \documentclass[12pt]{article} \usepackage{pgfplots} \usepgfplotslibrary{external} \tikzexternalize \pgfplotsset{compat=newest} \pgfplotstableread[col sep=comma]{ netname,...
0
votes
0answers
32 views

Moving average with pgfplots

I have a huge table of x,y data. Looks like this: \addplot+[mark size=0.2]table[row sep=\\,x = add,y = mul]{add mul \\ 2. 0.32 \\ 6.0 0.23 \\ 7.0 0.23 \\ 8.0 0.13 \\ 12.0 0.17 \\ 23.0 0.14 \\ 50....
1
vote
0answers
62 views

Plotting Heat Map - problem

I'm trying to plot a heat map with this data. I expected to create a heat map like the one given in the answer of this. (Although my plot will be only a quarter of it 0 to 90 degrees). But when I run ...
7
votes
1answer
111 views

Strange behavior of abs(x) in PGF Plots

I have the following code: \begin{tikzpicture} \begin{axis} [ axis lines = {center}, width = {0.6\linewidth}, ylabel = {$y$}, xlabel = {$x$}, ytick ...
0
votes
0answers
37 views

Range Restrictions in PGF/TikZ

I am currently trying to put multiple graphs in one \tikzpicture but when I try and put in the tangent function, due to its undefined nature at pi/2 and my domain being defined as -pi:pi my LaTeX ...
1
vote
0answers
52 views

pgfplot: 3D version of a plane and its the gradient vector

Checking pgfplot for the addplot3-command was easy! I've found this very nice possibility to plot a plane: \begin{tikzpicture} \begin{axis} \addplot3[ surf, mesh, ] {x+y+1}; \end{axis} \end{...
0
votes
0answers
20 views

pgfplots: Broken path styles if fillbetween is applied

I'm using pgfplots version 1.11. It seems that path styles (caps and widths) is broken when fillbetween is applied. See wrong path widths at the top plot and right one at the bottom. Minimum example: ...
2
votes
1answer
92 views

Compilation time speed up for this pgfplots figure possible?

I already experienced in this question that the right choice of assignments for the coordinate values and meta values from a table could increase the compilation speed of pgfplots due to the lua ...
1
vote
0answers
38 views

Filled contour from axis symmetric data

I have temperature data which is axis symmetric.(See Figure 1; apologies for my bad drawing) The number(1 to 10) denotes the point of measurement. Now, From this data, how do I get a filled contour ...
8
votes
2answers
104 views

Fill area between two curves

I just asked a very similar question: Fill area between two curves up to intersection. However it turned out that my minimal example was too simplified. In fact, I want to achieve the following: ...
4
votes
1answer
123 views

“Logarithmic scale” for negative values

I have the following MWE: \documentclass{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{filecontents} \pgfplotsset{compat=1.12} \begin{filecontents}{data.dat} 4 -1e4 4 -1e3 ...
7
votes
2answers
302 views

Fill area between two curves up to intersection

I want to fill the area between two curves. What I have so far: \documentclass{article} \usepackage{tikz,pgfplots} \usetikzlibrary{patterns} \usepgfplotslibrary{fillbetween} \begin{document} \begin{...
1
vote
1answer
62 views

pgfplots figure not working - undefined control sequence

When trying to insert a tikz figure, using the code below: \documentclass[]{memoir} \usepackage{pgfplots} \usepackage{pgf} \usepackage{tikz} \usetikzlibrary{arrows,...
1
vote
1answer
37 views

Plotting an equation in tikzpicture using pgfplots won't work

I want to plot this equation: 0.0172x + 2.9971 in lateX using the pgfplots package. I already made an axis and I plotted another graph using data points from a datafile. The data points and respective ...
2
votes
1answer
40 views

Overwrite point meta value after explicit definition

I want do some surface/mesh plots in pgfplots with a kind of logarithmic axis for positive and negative values. This is sometimes called a symlog colormap transformation, i.e. a logarithmic axis for ...