{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

1
vote
0answers
11 views

Shared legend below a group of horizontally aligned figures in pgfplots

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 ...
1
vote
1answer
16 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
72 views

Batman Equation in LaTeX

I've tried to make the Batman Euqation in LaTeX. But I have a lot of problems. The code so far: \documentclass[border=10pt, tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{arrows,positioning} ...
2
votes
1answer
34 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] ...
1
vote
0answers
19 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
42 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
22 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
71 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
39 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
32 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
24 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
24 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
63 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
146 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
28 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
62 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
50 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
39 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
33 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
29 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
45 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
64 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
29 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
79 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
76 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
87 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 ...
2
votes
1answer
47 views

Second y-axis inside groupplot

I would like to add a second y-axis inside a groupplot. If there's a better/easier way to get the plot I want (see figure) I am willing to not use groupplot. \documentclass[tikz]{standalone} ...
2
votes
1answer
58 views

Add the letter of a subfigure to each axis in a tikzpicture

Is there a possibility to add a letter/number to each axis (without additional text) in a tikzpicture generated by matlab2tikz script, maybe with a \subcaption? Because of the lack of space, it would ...
1
vote
1answer
47 views

pgfplots: Using two horizontal colorbars within one plot

For my work I'm going to need a graphic with two seperate colorbars. According to the pgfplots manual there is the lowlevel key /pgfplots/colorbar/draw/.code={⟨... ⟩} (chapter 4.9.12, page 233). I've ...
1
vote
1answer
30 views

pgfplots point meta using luatex

I am trying to make a plot and color the points according to a third column using only marks, point meta=\thisrow{Lz\N} in addplot. I get the error-Log entry: Package pgfplots info on input line 1: ...
2
votes
2answers
88 views

colour coding of 2-d-data

Imagine the following requirement: There is a rectangular matrix of variable size with integer elements. These data are located in an ascii file. I need to get it into a TikZ graphic (1) where the ...
1
vote
1answer
29 views

Change arrow head type for quiver plot in PGFPLOTS

I have multiple quiver plots in one figure and want to distinguish between them by the arrow head type/ style. Can anyone help me, how the head can be changed? Thanks, Peter My MWE: ...
4
votes
1answer
29 views

Axis dir=reverse and colormap bug (?) in Tikz

I'm fairly new to this, so I might just be missing something obvious. I've been doing some research but found nothing much so far. For some reason, the y-axis is by default displayed pointing to the ...
4
votes
1answer
81 views

Create a 3D figure (surf) from .csv file

I have a .csv file with 3 columns: time, f and psd. I would like to create a 3D surf plot using this data. Just like the following image generated in Matlab. . Here is the link to the data I am ...