{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
1answer
23 views

PGF labels in groupplot vs. the list of figures

For my bachelor thesis I'm relying on pgf for my plots. In the groupplot environment I create a node to label each subfigure, something like: \node at (x,y) { \textbf{a)} ...
5
votes
1answer
21 views

Unmodified boxplot with pgfplots

When using pgfplots to create a boxplot, it'll draw a modified box plot by default, where the whiskers are the largest/smallest non-outlier values and the outliers are represented by dots. Is there a ...
4
votes
2answers
229 views

Simpsons function illustration in Tikz

I have this code: \documentclass[border=2pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{animate} \usepackage{calc} \usepackage{fp} \usepackage{pgfplots} \usepackage{tikz} ...
3
votes
0answers
20 views

Pgfplots: \addplot3 with all axis in logarithmic scale

I would like to generate a surf plot and set the mode of all axis to "log". For instance \documentclass[tikz]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} ...
2
votes
1answer
42 views

Drawing smooth path of particle through magnet system

I need to get a plot with a trajectory of particle through system of magnets. So I know the coordinate and angle of particle on the edge of each magnet (like y=0,5 alpha=0.3rad) so how can I draw a ...
3
votes
1answer
33 views

Is it possible to make a gradient from 'opaque color' to 'total transparency'?

It seems like the 'color' transparent acts just like black (changing opacity acts as some kind of gray): \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} ...
3
votes
0answers
52 views

Grouping data in pgfplots

I have a file with measurement results for different settings (group) in a single csv file as shown below. I would like to plot a line in pgfplots for each group and provide an appropriate legend. Is ...
1
vote
1answer
40 views

Double positive x-axes plot

I'd like to draw a plot in which the coordinate system is split in two: the y-axis in the middle running from 1e0 (it's a loglog plot) and two x-axes running from the same 1e0 to positive values 1e3. ...
5
votes
3answers
90 views

pgfplots: use foreach inside addplot

I want to add a bunch of evenly spaced vertical lines to a plot using \foreach. I can do it like this: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.10} ...
3
votes
0answers
22 views

Is there a way to automatically force xticks on first and last data point in pgfplots?

I have created a custom pgfplot style which allows me to create line plots with the x axis being a time in hh:mm format. The data is loaded from .csv files. The automatic tick placement on the x axis ...
4
votes
3answers
117 views

How to fill area bounded by two curves using tikzpicture

I would like to ask a question on how to shaded the area between two curves. First of all the following is the code \documentclass[]{article} \usepackage[margin=0.5in]{geometry} ...
0
votes
0answers
17 views

change size of point label in pgfplots [duplicate]

I would like to change the font size of labels next to points in pgfplots. As an answer to my previous question I got the following MWE: \documentclass{standalone} \usepackage{pgfplots} ...
1
vote
1answer
20 views

label points from table

I plot some points in pgfplots like in the following MWE: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} \begin{tikzpicture} ...
1
vote
2answers
343 views

Matlab2tikz, alignment of subplot ylabel (large distance from plot)

Matlab2tikz came to my attention in the past month and have been using the simple tutorial from HowToTeX. It has worked great so far only one issue remains, I am unable to anchor the ylabel to the ...
3
votes
1answer
62 views

Nodes and arrows from tikz not showing when using input, the rest from pgfplots is ok

In general I create all my tikzpictures in separate tex files which I then input using the \input command to a main tex file. I started using a template from my university for the main file and now I ...
6
votes
2answers
78 views

Rotate label on secondary axis

So, I want to have a plot with two y-axes - done. However, since the labels consist of only one symbol, I want them written horizontally. That is usually accomplished by rotate=-90. This works, but ...
3
votes
1answer
17 views

pgfplots: meta key not working when used in style

This is a follow up question of this question. \documentclass{standalone} \usepackage{pgfplots} % Style with meta option \pgfplotsset{ myStyleWithMeta/.style={ meta=Label, } } ...
5
votes
1answer
47 views

Split line in `legend` with `pgfplots`

In the following plot, how can I split the red line of the caption into a red line and a blue dashed line (so that the total length of the red-blue segment is that of the green one)? MWE: ...
4
votes
2answers
57 views

pgfplots + animate: Incorrect math mode symbols (unwanted verbatim)

Description I want to make an animated diagram. As soon I use the animate environment the stuff in math mode ($...$) is not displayed correctly (looks like verbatim text with _ ^ and so on). MWE ...
-1
votes
0answers
94 views

Can anyone help me to draw the following shape? [closed]

please help me to draw this shape with pgfplots.
3
votes
1answer
39 views

Scatterplot from table with markers set by meta column value

My input data is a txt file with a number of columns and rows. The last column value is always an integer taking a value of 0, 1, 2, or 3. I need a scatterplot which has a different marker depending ...
3
votes
1answer
27 views

pgfplots legend disappearing with externalization

I have an issue with a combination of a special legend I am doing in a pgfplot, and with using tikz externalization. See the MWE below. The legend will not appear if I use externalization, but if I ...
3
votes
1answer
31 views

pgfplot - remove “top-border-line” and spacing between x-axis and bars

I am currently trying to create a bar chart using pgfplots. My objective is to create a bar chart in which the bars are directly "sitting on top" of the x-axis AND there should be no ...
3
votes
0answers
43 views

Pgfplots: Transpose headrow as first column in: confusion matrix with colormaps / heatmaps

My question builds on code from this question: original question/answer What I am trying to achieve: I want to use pgfplots to build a table, where the header row is automatically added as first ...
2
votes
1answer
41 views

Reversing y axis in polaraxis plot

I'm trying to reverse the y axis of my polaraxis plot while keeping the zero towards east. This is supposed to produce a clockwise polar plot. However, the tick anchors are not mirrored in the ...
3
votes
0answers
30 views

“[name path=]” causes document to not finish compiling

I want to plot the area between two functions. On one machine it compiles nicely, on the other one it hangs. Code: \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{groupplots, ...
1
vote
0answers
33 views

List of Tables not filling with pgfplots package

This is my first question on here but I am hoping someone can help me with this issue. I am writing a thesis with my university's .sty file for formatting, however when I compile the list of tables ...
1
vote
0answers
32 views

Scaling tikz graph when pgfplots is loaded

This question is related to: tikz: Scaling the unscalable — issues with a TikZ graph I'm using the suggested modification from the linked answer to scale tikz graphs. However, I'm also including ...
0
votes
0answers
33 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 ...
3
votes
1answer
66 views

Add plot to node in Tikz matrix

Using the code at the end, I was able to create this image. I would like to add a plot (I'm plotting kernel densities) to each of the nodes on the edge, and move their labels below the plot, ...
7
votes
1answer
62 views

Displaying significance of results in pgfplots by lines with asteriks

after searching for some time without finding a satisfying answer, I finally decided to post my first question. Using the search function, I found simmilar questions, but non of the answer given there ...
3
votes
1answer
99 views

Absolute positions of text over a tikz image

I'm trying to create a composite figure in Latex, by layering two images (pngs) on top of each other with a text label added. Sadly, this seem surprisingly difficult to achieve in LaTeX. I tried the ...
1
vote
1answer
66 views

Font size in PGFPlots Minipage

I am using this guide to put concorde tsp solver's vector graphics in LaTeX. I want to show 2 images and a description text right next to them, all side-by-side. I am usign the minipage to do so, but ...
1
vote
1answer
86 views

Drawing spherical 3D plot with PGFPlots

I want to draw some plots which looks like that ; I did not find anything related to this in the doc, and browse the Internet without success. I found ways to plot spherical values with a changing ...
1
vote
1answer
45 views

How to translate a figure on a path (rollercoaster)

Is it possible to make something like this: The best thing I could do was this: With this code: \documentclass[symmetric,justified,a4paper]{tufte-book} \usepackage[utf8]{inputenc} ...
2
votes
0answers
50 views

PGFPlots: calculate linear regression of part of the plot

I'm trying to calculate the young modulus of a certain material using it's load-deflection curve. For such, I need to get the slope of the linear part of the curve (just the beginning). But my files ...
5
votes
1answer
379 views

Tikz : compare x^3 and 2^x * x from x = 0 to 10

I'm far from being an expert in TikZ because I just start using it. I would like to be able to plot this comparison of equations: This plot came from the Wolfram Alpha, which is a very good ...
3
votes
1answer
60 views

Slightly move x- or y-axis tick label in pgfplots

In the MWE below, I'd like to move the x-axis labels slightly away from each other horizontally and the y-axis labels slightly away from each other vertically, to avoid overlapping. How can I do this? ...
2
votes
1answer
31 views

clickable area shifted when typesetting by xelatex for Clickable Plots

I have the following codes for clickable plots: \documentclass{article} \usepackage{pgfplots} \usetikzlibrary{pgfplots.clickable} \pgfplotsset{compat=newest} \pgfplotsset{yticklabel style={text ...
4
votes
2answers
68 views

how to obtain exactly same size standalone pgfplots

I am using standalone to make pdfs of my pgfplots to later include as an image into my main document. The y-axis are different for some of the plots (some negative, some positive), thus the size of ...
1
vote
1answer
30 views

pgfplots plot stops at x-value of 5

I have a short question. I made the pgfplot below. But somehow all the functions are only shown to the x-value of 5. It behaves "normal" when the definitions [ width=10cm, height=7.5cm, xmin=0, ...
2
votes
1answer
31 views

Pgfmath misbehaving when reading negative values from table in Pgfplots

I am astonished that when I attempt to square a number read from a table with pgfplots, the result has the same sign. Consider this: \documentclass{standalone} \usepackage{pgfplots} ...
0
votes
1answer
70 views

How to plot this integral function with PSTricks? [duplicate]

I have to plot something like that (the function I have to integrate is more complicate than this) How can I do that? Which pst package do I need? Thanks!
1
vote
1answer
41 views

Pgfplots: How do I change plot line width independently of axis line width?

I can use something like \pgfplotsset{every axis/.append style={line width=1pt}} to make all lines 1pt thick, but I would like to make only the plot lines thicker. I can do this on a per-plot-basis ...
5
votes
1answer
141 views

Radar Chart - problem with axis

I have some problems drawing a radar chart. I would like to draw the following chart. I tried to paste pieces of code found here and there (I know that is not a good way) and I obtained the ...
2
votes
0answers
37 views

PGFPlots: Sometimes minor ticks don't show

See code below: xtick={-0.8,0,...,3.2} does not show minor x ticks, but, for example, xtick={0,0.5,...,3.5} does. I'm confused, what's going on? \documentclass[border=0pt]{standalone} ...
3
votes
1answer
215 views

How to draw a function like sin(x)~cos(x) in tikz/pgfplots?

In R it's easy to do something like x <- seq(0, 2*pi, 0.01) plot(sin(x), cos(3*x), type='line') to get the plot How can I make such a plot using tikz/pgfplots?
2
votes
1answer
43 views

`Missing = inserted for \ifnum` when using addplot

I'm trying to plot a normalized sinc function with PGFPlots/TikZ. As this is somewhat tricky because of the limiting value at 0, I used a suggestion provided by percusse. Here's a minimal example ...
1
vote
1answer
32 views

How can I use \foreach to place nodes in a pgfplots axis?

I am trying to foreach over some coordinates to place nodes at whilst inside an axis environment. I followed the advice here, but I am getting nowhere; the following fails with error ! Argument of ...
1
vote
1answer
37 views

How can I remove all tics except extra tics?

I made a Plot witz pgfplot and made a few extra ticks. Now I want only those extra ticks to be shown. I removed the numbers with xticklabels={}, but the ticks are still there. Here is a small ...