{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
14 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
36 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 ...
1
vote
0answers
16 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
0answers
22 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
16 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
22 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
30 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
60 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
61 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
88 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
63 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
83 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
43 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
48 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
368 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
56 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
30 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
66 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
27 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
30 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
69 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
36 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
137 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
33 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
205 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
41 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
30 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
33 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 ...
3
votes
3answers
257 views

Tikzpicture: Step function (most minimalistic!)

I found nice example of step functions, e.g. probability-density-function-of-uniform-distribution and drawing-cumulative-distribution-function-for-a-discrete-variable. But they use extensive ...
1
vote
1answer
34 views

Pgfplots: Labels from data table not working as expected

I use pgfplots for the first time, so the error is probably at my end, but I was under the impression that xlabels from data={\table}{colname} could be used to set strings from a data table as ...
4
votes
1answer
34 views

pgfplots Limits Ranges strange behaviour

When I do a plot with pgfplots and define Limits Ranges (xmin etc.) and additionally try to draw in the coordinate system, I have to add the limit ranges when using relative coordinates. Am I doing ...
0
votes
0answers
31 views

TikZpicture/pgfplots: How to reduce quantity of displayed xticklabels when using “xticklabels from table”?

I want to generate a simple x/y-diagram with data out of a data-table (~ 2000 values). Minimum Working Example (MWE): \begin{filecontents}{Data_Table.csv} X Y 00:00 0 00:01 50 00:01 100 ...
3
votes
1answer
46 views

TikZpicture/pgfplots: How to insert time-data in mm:ss-format (without hh:) into x-axis?

Imagine an ordinary x/y-diagram by using the pgfplots/tikzpicture-packages: In case of regular date-values (dd-mm-yyyy) usually there is no problem in application. But now, I have to add times-values ...
1
vote
0answers
48 views

Temporarily disable Tikz shadow in pgfplots

I am using Tikz to create nice margin notes, like Gonzalo's answer to create a framed environment for a margin note I added a shadow to these notes with `drop shadow =' followed by a color. It works ...
2
votes
1answer
29 views

Using a text inside a math environment in a pgfplots label

How is it possible to have a \text{} field inside of a math environment of a pgfplots label. A minimum not working example is displayed below: \begin{tikzpicture} ...
2
votes
1answer
40 views

Drawing a square that respects layers pgfplots

I have a pgfplots code that generates a paraboloid on top of a circle; \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
74 views

Funky (don't know how else to describe) Surface Plot

Below is an MWE \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{groupplots} \usetikzlibrary{pgfplots.groupplots} \pgfplotsset{compat = 1.12} \begin{document} \centering ...
1
vote
1answer
32 views

Label positioning in pgfplots

I am using lualatex and I am having trouble positioning the labels of a grouplot at the bottom of the plots. Here is my code % !Mode:: "TeX:UTF-8" \documentclass[a4paper,12pt]{book} ...
4
votes
1answer
103 views

Surface of revolution in pgfplots

I'm looking to make a plot for a latex report I'm writing. Effectively the plot is a paraboloid sat ontop of a circle but I'm having some issue creating the surface of revolution for the paraboloid. ...
3
votes
2answers
45 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
vote
1answer
72 views

pgfplots with list and make fails on windows (mingw)

System specs: MiKTeX 2.9, Windows 8.1, -shell-escape added, MinGW installed. MWE: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} ...
5
votes
1answer
81 views

How can I use trigonometric functions and tick labels with pgfplots?

\begin{tikzpicture} \begin{axis}[ axis lines=middle, samples=100, ymax=5,legend pos=north east, legend style={draw=none} ] \addplot[forget plot,cyan,domain=0.001:8] {abs(log10(x))}; ...
2
votes
1answer
28 views

Scaled tick option not working

I'm trying to plot some time series data using pgfplots. I do not want any "tick scaling" (i.e. scientific notation for my axis). I have tried the scaled ticksand scaled y ticks options, setting them ...
4
votes
0answers
66 views

A problem with pgfplots and coordinates

I'm using Jake's code in his answer to How can I automatically mark local extrema with pgfplots and scatter?. Using the mark max style I can retrieve the value for the y-coordinate of the maximum for ...
1
vote
1answer
42 views

plotting side by side two subfigures in a one figure in an llncs class file [duplicate]

I want to plot two figures in the same line. I'm also using the llncs Springer class file found here for my document. I have these two figures: \begin{figure} \begin{tikzpicture} \begin{axis}[ ...
6
votes
2answers
90 views

Three dimensional Regression Plan with Residuals

In R, I can make three dimensional Regression plane with residuals with the following command scatter3d(prestige ~ income + education, data=Duncan) with scatter3d function from car R package. I ...
5
votes
1answer
59 views

Plotting piecewise function using declare function

I am trying to plot a piecewise defined function, but somehow I don't manage to get it right. See below. I use the following code \begin{tikzpicture}[ declare function={ func(\x)=(\x >8/10) * ...
3
votes
1answer
90 views

pgfplots 3D bar chart - wrong plotting order

I am using bar3 to plot 3d diagrams in Matlab but it seems that in LaTeX the plotting order is wrong ? Is there any way to have the right order? This is a small example of the generated 2.tikz file ...
8
votes
1answer
422 views

Specify x and y in different coordinate systems in pgfplots similar to gnuplot

In gnuplot you can specify positions in several coordinate systems: First, Second, Graph, Screen, Character. What are the equivalents in pgfplots? I know the following: First : axis cs: Second : ...
1
vote
1answer
120 views

Graphs/Charts in Latex

Being new to Latex, I'm finding it hard to draw graphs in latex. I wish to draw this graph. Can anyone please help me with the same? Here is the code I had been trying to use: \begin{tikzpicture} ...