{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

4
votes
1answer
93 views

imagesc in tikz with non-symmetric matrices and squared axis

In principle the problem is the same like in matlab2tikz imagesc TikZ/pgfplots equivalent Can somebody tell me how to adopt this snippet to plot non-symmetric matrices but with squared axis (without ...
3
votes
1answer
40 views

Horizontal alignment of ytick labels

I am working on a population pyramid. With some sort of hard-code I managed to overlap the ytick-labels of the age in the middle of the graph (but not properly). My question is, how to 1.) suppress ...
4
votes
1answer
32 views

lower and upper case in axis-labels

pgfplots output for labels is only capital letters, I would like to make the axis labels case sensitive but can't seems to find a way todo this. \documentclass[12pt, %Schriftgröße a4paper, ...
4
votes
2answers
143 views

Plotting matrix image data

I have data from infrared measurements in a file with 194 rows and 194 columns, each value representing the temperature at a certain pixel. As the image from the camera does not look nice, I would ...
3
votes
1answer
46 views

How do I change the font size of the labels along the axes in pgfplots [using scaling]?

This is a continuation of a question that was asked and 'answered' here: How do I change the font size of the labels along the axes in pgfplots?. The suggested answers all involved using LaTeX's ...
2
votes
1answer
43 views

Two ordinates - gray tick lines overlay black axis line

I want to plot two data series with different y-coordinates over the same x. Therefore a second ordinate is drawn with a second axis environment. When I now limit the range to be drawn, the gray tick ...
3
votes
0answers
41 views

Pgfplots: Draw time-series without missing data

I have time-series data which I want to draw with pgfplots. The data only covers weekdays, thus no weekends. Still pgfplots inserts new ticks for datapoints having essentially no data, this results in ...
3
votes
1answer
71 views

Why doesn't this example from the pgfplots manual compile?

I copied this example from page 134 of the pgfplots manual (version 1.12.1): \documentclass{article} \usepackage{pgfplots} \pgfplotsset{width=7cm,compat=1.12} \usepgfplotslibrary{patchplots} ...
2
votes
1answer
79 views

Adding a 2D plot to a 3D plot without closing the ends

I want to add 2 parabolas to a plot of a hyperbolic paraboloid, but I can't figure out (and couldn't find any information on the internet) how to keep pgfplots from closing the ends of the graphs. My ...
3
votes
1answer
89 views

Colored circles from data

I have a data file which gives x-position (xpos), radius, and color. I wish to draw a circle at ever (xpos,0) with appropriate radius and color. How do I achieve that? I have used two approaches. ...
5
votes
0answers
102 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 ...
1
vote
0answers
57 views

pgfplot SLERP, LERP or SQUAD existant

Are there any already existent drawings of LERP, SLERP, or SQUAD (similar to the drawing done here) done using tikz?
3
votes
1answer
33 views

pgfplots: replace scatter markers with custom text

I'm wondering if it's possible using pgfplot to plot a 3D scatter plot with lines between each point where the point is replaced with a value. Image is shown below. Currently I am populating the ...
2
votes
1answer
36 views

Placing pgfplot graphs side-by-side in two column format

I am trying to put three graphs side by side in two column format. The figures is shown below. My LaTeX code is as following: \begin{figure*} \centering ...
3
votes
1answer
41 views

How to refer to pgfplot legend labels with hyperref?

I would like to \refer to a pgf legend label in the caption of a figure (to explain symbols). I create my figures with externalization. Without the hyperref package, everything works fine. But as soon ...
5
votes
1answer
163 views

How to plot a system model like in Microsoft Visio with tikz and pgfplots?

The diagram that I would like to reproduce using tikz/pgfplots is given below: I tried to do it but I did not succeed (I am new to pgfplots and tikz). Here is my code and my output file. For ...
6
votes
1answer
61 views

Extra tick label on opposite axis

I would like my extra x tick label to be on the top of the graph, so that it would not interfere with the others tick labels. How can I manage to do that? Here is a minimal working example: ...
7
votes
3answers
96 views

How to do a surface plot of a function

I would like to create a surface/contour plot of (y+ln(1-x))^2/y^2 for the range of x=0:0.5 and y=1:30. Here the wanted result from Wolfram Alpha. However my attempt in PGF fails miserably: ...
1
vote
0answers
40 views

Pgfplot with logarithmic x-axis to zero

I'm busy creating a learning curve, however I am unable to get my plots (blue) and my baseline (black) to zero. I use a logarythmic x-axis with fixed tick points. When i use xmin > 0, my whole plot ...
4
votes
3answers
109 views

How to remove the white spaces in the margin of pgfplots?

I have the following code from pgfplots's web site. I execute it but I get a full pdf file as shown below: However, I would like to reproduce the figure as given here ...
0
votes
0answers
44 views

Quiver plot with scaled arrowheads

This is a follow-up question to this one. Here is a MWE showing the problem: \documentclass[tikz]{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{pgfplots} ...
2
votes
0answers
38 views

Box plots from dataset with metadata in one column and data in another

How can I instruct pgfplots to generate a boxplot from a dataset with an identifier in one column (Label in the example below) and the data in another column (Value in the example below)? I would like ...
0
votes
0answers
36 views

Auto label points read from file

My question is the following, I read data from txt file where the data are stored as: North,East 1,5 4,7 a file with code \pgfplotstableread[col sep=comma, header=true {data.csv}\table; \addplot ...
2
votes
1answer
48 views

PGFPlot no line between data points when reading from table

I have been searching stackexchange aswell as the pgfplots and pdfplotstable documentation. My problem is that when i read into the data from a *.txt file and I select the columns and rows i want to ...
4
votes
1answer
42 views

my centering command does not work! why?

I am going to plot a bar histogram using the following command: \documentclass[a4paper]{report}‎ \usepackage{pgfplots}‎ \pgfplotsset{compat=newest}‎ \begin{document}‎ \begin{tikzpicture}‎ \centering‎ ...
0
votes
0answers
29 views

Animate pgfplots of data stored in external files

Can I generate an animation plot of data stored in external file as txt file? The data are stored as X Y Z 20 20 20 40 50 60 ... And I want generate in a single file two plots animated: x vs ...
2
votes
1answer
67 views

How can i use the content of the \usepgfplotslibrary{fillbetween} in the LaTeX Code WITHOUT the order: \usepgfplotslibrary{fillbetween}

Hey I have to use LaTeX in Wordpress with the plugin Quicklatex. There is a problem while using the pgfplots package. When I type \usepgfplotslibrary{fillbetween} in the preamble, i get the error: I ...
5
votes
1answer
60 views

pdfpages-PDF appears in background of pgfplots-plot

I'm using pgfplots with the externalize feature, which creates external pdfs for all my plots. But there seems to be a strange interaction with pdfpages when externalize is used. The pdf I'm including ...
3
votes
1answer
87 views

Coordinate System in Tikz with plottet with one equation

I would like to have this coordinate system (with numbers on the axes): I know how to make it in Tikz; but the numbers on the axes are missing and I would like to add a plot: ...
3
votes
0answers
80 views

Pgfplots Boxplots with a thick line at the mean value

pgfplot produces nice looking plots, that have consistent look and feel. But sometimes you have a good reason to change that look, and I found it tricky to change style of an specific line, circle, ...
0
votes
0answers
19 views

Print issue 3D pgfplots, shader=interp

I have some trouble with printing a 3D plot created with pgfplots. With using an interpolation shader, the map is not printed. The same problem accours when I copy and past my pdf, the map disappear ...
1
vote
1answer
36 views

Shared legend below a group of horizontally aligned figures in pgfplots [duplicate]

How should I run the following example code using /pgfplots/legend to name={<name>} to put a shared legend below a group of horizontally aligned figures? The example code using ...
2
votes
1answer
35 views

pgfplots: locally activating linear scale in a log scale plot

I have the following short example: \documentclass[tikz,10pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{amsmath,amsfonts} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
4
votes
0answers
208 views

Batman Equation in LaTeX

Based on the answer from Gonzalo Medina, the Batman Equation in LaTeX is nearly finished. \documentclass[border=10pt, tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{arrows} \tikzset{ ...
2
votes
1answer
48 views

Filling in with pgfplots and draw

I created the following polygon: \tikz \draw[very thick,name path=A] (0,15) to [out=0,in=270] (15,30); \draw[very thick, name path=B] (0,15) to [out=0,in=90] (15,0); \draw[very thick,name path=C] ...
3
votes
1answer
53 views

pgfplots external with large dataset (lualatex?)

I have fairly large datasets with densely strucutred data that i cant downsampe much without loosing structure. I use TexMaker on Ubuntu 14.04LTS. I use \usepackage{tikz,pgfplots,pgfplotstable} ...
1
vote
1answer
62 views

Default curve style in pgfplots

Can I set a default style for curves in pgfplots? E.g. I want all my curves in my document to be blue, axes black.
3
votes
1answer
39 views

Draw axis line on top macro does not work with colorbar

I have a macro from here: Force "axis on top" for plotmarks in pgfplots Which allows me to draw the axis line on top of the markers. However, if I use it in conjunction with a colorbar, it ...
6
votes
1answer
84 views

Can I increase the accuracy of pgfplots?

Working on a pgfplots solution to this question, I faced the following problem. When I plot only one branch of a square root function, the plot seems to be OK; but when I add the minus part of the ...
0
votes
0answers
44 views

Latex bar graph PGFPlots

Im trying to create a bar plot but something doesn't go quite right the bar plot is sort of scrambled and i can figure out where it goes wrong . Here is what is have ...
1
vote
0answers
40 views

Calculate pearson correlation, r in pgfplots

Is it possible to calculate the pearson correlation, r or r^2 value from a linear regression using pgfplots? I already have the curve and would like to display the r value in the legend. I couldn't ...
2
votes
0answers
31 views

PGFPlots colorbar incompatible with set layers

This is just out of curiosity. If I use the command \pgfplotsset{set layers} in conjunction with a colorbar, the plot is shifted on my page and the colorbar does not appear where it is supposed to. ...
2
votes
1answer
37 views

Legend entry not showing correct image

I don't know why the legend does not reflect the correct image for its respective entry. I want the last two entries to just show the marker and not the line (dashed line). I set the last two to just ...
4
votes
2answers
77 views

Oblique projection in 3d pgfplots

How can I make pgfplots to show the coordinate system from a view like in the following picture. The graph paper doesn't matter, but as you can see the x_1 axis should be relative to the graph paper ...
7
votes
1answer
73 views

Labels parallel near curves

I have plotted some curves for different orders of a polynomial. The code and the resulting image look similar to this: \documentclass[convert]{standalone} \usepackage{pgfplots} \begin{document} ...
4
votes
2answers
155 views

my first animate project times out

The last few days I have been working on a visualization of the clark/park-transformation used in electrical engineering. It's look like this: This whole file is "dynamic", meaning that if I change ...
1
vote
0answers
40 views

pgfplots subfigure positioned side by side

I am having trouble forcing the two pgfplots to appear side by side, can someone please fix my coding. I would also like to center the subcaptions better if possible. I cut most of the data to fit ...
4
votes
1answer
34 views

Clipping a 3D plot with pgfplots

How can I clip the paths of a 3D plot to the 3D axis bounding box? I am not talking about clipping the path to the projection of the bounding box (which pgfplots does by default), I want to remove ...
4
votes
1answer
85 views

How to make a nice legend for a histogram with pgfplots

I am trying to make a histogram with the fitted curve plotted on it. Here's the mwe: \documentclass[a4paper]{scrartcl} \usepackage{tikz} \usepackage{pgfplots,pgfplotstable} ...
4
votes
1answer
88 views

Combining line chart data with bar plot

Context I recently got a paper published and was told that I need to convert the word file I submitted to latex for camera ready purposes. Problem is, I don't know LaTeX but I have always wanted to ...