{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
1answer
29 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
20 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 ...
1
vote
1answer
27 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 ...
4
votes
1answer
42 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 ...
2
votes
1answer
66 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
54 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
12 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
27 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
27 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} ...
2
votes
0answers
204 views

How to make the beautiful Thesis Time Schedule in LaTeX? [on hold]

I want to make the Time Schedule in LaTeX but it's not working properly. First I want to make the atleast three rectanuglar boxes and when in TASK row I start writing full picture forward. So need ...
4
votes
0answers
176 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
41 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
32 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
46 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.
2
votes
0answers
23 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
75 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
40 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
33 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
25 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
27 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
66 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
68 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
149 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
31 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
29 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
65 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
54 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 ...
3
votes
2answers
23 views

Bar plot in pgfplots using a palette using only fill

I am trying to create some nice looking bar plots, but this does not seem to be an easy task for me :) I have started out with the following: \begin{tikzpicture} \begin{axis}[ xbar, xmin=0, ...
0
votes
1answer
34 views

Compute average value of a column with pgfplots

Based on the famous example to create a new column containing the min/max/avg... value of one column, I was wondering how to compute the average value and then to use it as a float variable in a ...
3
votes
1answer
51 views

Omitt some xticklabels

I am currently reading some data from a CSV-file together with the xticklabels as one column from that file: \pgfplotstableread[col sep=comma]{data/test1_d4.csv}\dataTestOneFour \begin{figure}[ht] ...
3
votes
1answer
30 views

pgfplots and ifthenelse

To be honest, the following example not exactly works as I had expected. \documentclass{scrartcl} \usepackage{pgfplots} \pgfplotsset{compat=newest} % taken from ...
1
vote
1answer
42 views

Changing tick label size globally

I am trying to change the font size of the tick labels, but they won't react to \pgfplotsset{every tick label/.append style={font=\scriptsize}} This is because I create the tikz-file automatically ...
3
votes
1answer
35 views

How to add node above pgfplot Y axis max?

I want to add some nodes (labels) above the max value of the Y axis in a pgfplots. I came with the following MWE: \documentclass{beamer} \usepackage{tikz} \usepackage{pgfplots} ...
2
votes
0answers
64 views

How can I automate the plotting of step functions?

I'm using a lot of step functions in my master's thesis and would like to automate the plotting. I can get them to look just as I want by hand using this method, but when I try to automate it like ...
3
votes
2answers
37 views

Plot “timeout” with pgfplots

I'm plotting some timing results using pgfplots. The times are shown on a log scale. Each of the three techniques eventually ends in a timeout, and I'd like to show that somehow in the graph. I ...
2
votes
1answer
31 views

How to scale and color the *-plotmark in scatter plot using pgfplots in conjunction with a colorbar

What I have right now: \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \begin{document} \pgfplotstableread{ A B C 0 5 -1 0.5 2 0 1 7 1 1.5 11 ...
1
vote
1answer
46 views

Specifications in the axis environment ignored

This is a similar display from another post of mine. There are only two differences. (One of these differences is the placements of the labels for the lines. In my post, I had the labels along the ...
2
votes
2answers
66 views

Insert space between tick labels and axis in Pgfplots

I'd like to add some vertical space between the x tick labels and the x axis in a Pgfplots plot. Is this possible? Background: I have two subfigures arranged next to each other (horizontally) using ...
2
votes
1answer
40 views

Placing labels at the end of lines

I have a display depicting two triangles that are reflections of each other across the line y=x. At the end of the line y=x - in the same direction as the line and 7.5pt away from the arrow tip - I ...
1
vote
1answer
26 views

pgfplot cannot read file

I am trying to make a figure but I get an error about cannot read file. I made sure the dat file is in the directory with the .tex file and that the spelling is correct. the error also ...
1
vote
1answer
69 views

A display indicating the definition of the distance between a point and a line (using only TikZ)

In the following display, a point (-4,5) and a line are drawn. A dashed line is drawn from (-4,5) to the line indicating the distance between them. I call the intersection between the given line and ...
3
votes
1answer
48 views

Drawing piecewise linear plots with pgfplots

I'd like to draw something like the following (which was done in Mathematica) in pgfplots, but I can't find a way to define a piecewise linear function and have pgfplots get the full and empty circles ...
1
vote
1answer
44 views

Plotting function with \addplot does not work

I would like to plot a function with Tikz. I did it this way: \documentclass[11pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[german]{babel} \usepackage{mathtools} ...
3
votes
1answer
55 views

Fermi--Dirac in pgfplots, dimension too lage

I'm trying to draw a plot of the Fermi-Dirac distribution, for which I'd like to show a few lines of varied temperate (T). My code works for this, except for zero temperature, it results in a ...
6
votes
1answer
57 views

Some modifications to the axis environment

I have the graph of a function and its inverse. I would like two slight modifications to the axis environment. I want grid lines drawn at multiples of 5 from the axes. For some reason, the vertical ...
2
votes
0answers
30 views

How can we define a custom variant of addplot, including new keys and default values?

I frequently create plots with \addplot using a lot of optional arguments, making it difficult to keep the code consistent. I have a few repeating plotstyles so I tried to implement a new macro that ...
4
votes
2answers
80 views

Keep position of coordinates with different axis-scale

How can I keep the position of a coordinate when I use it in another environment with a different axis-scale? In the example, I would like the \node [...] at (c); in the right picture to be in the ...
3
votes
1answer
59 views

Some modifications for a display showing graphs of a function and its inverse

I have a display of the graphs of an exponential function and its inverse. I would like two slight modifications. I do not want the line passing through (0,15) and (15,0) plotted. I used line width ...
3
votes
2answers
78 views

Using pfg plots to plot unit simplex in 3 dimensions

I am trying to plot something that looks a little like this: I am using the following code: \begin{tikzpicture} \begin{axis}[ grid=major] \addplot3[ surf, ] coordinates { (1,0,0) (0,1,0) ...
1
vote
0answers
90 views

Segmented bar chart under tikz plot

I'm trying to create a segmented bar chart (stacked bar chart) under my tikz plot: For each point, I want to make a segmented bar chart directly below the point. The segmented bar chart for each ...