{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
1answer
44 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 ...
4
votes
0answers
280 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{ ...
3
votes
1answer
95 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: ...
0
votes
0answers
27 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 ...
3
votes
1answer
69 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} ...
8
votes
3answers
1k views

Helix on a cylinder

I want to plot geodesics on a cylinder. These are straight lines, circles or helices. I can plot the first two, but I don't know how to draw the helices. To be precise, I would like to know how to ...
2
votes
1answer
38 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
1answer
161 views

Scaling inset plot relative to main plot axis length

I want to create a plot with a second, smaller plot as an inset. This is easy enough using the following code, where the widths of the plots are defined. However, I often use figures in several ...
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] ...
1
vote
1answer
65 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
124 views

pgfplots: Fixing overlapping X axis labels

I am trying to create a time series plot but my X axis labels overlap: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{width=14cm,compat=newest} \usepgfplotslibrary{dateplot} ...
6
votes
1answer
92 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 ...
4
votes
2answers
170 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
49 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 ...
5
votes
1answer
1k views

pgfplots - how to create a horizontal line plot in a bar chart with symbolic x axis labels

I was wondering if there was a way to get the line plots "Unseamed" and "Requirement" to span the whole width of the graph not just from the centre points of the first and last x axis labels. Is there ...
4
votes
1answer
99 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} ...
2
votes
0answers
32 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
48 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
85 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
77 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} ...
1
vote
0answers
46 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
37 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 ...
1
vote
1answer
109 views

How to draw a picture in electrical circuit diagrams in Latex?

Now, I'm having a electrical circuit diagrams, i don't know how to draw it's in GeoGebra, please help me, thank you.
2
votes
2answers
120 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 ...
3
votes
1answer
57 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] ...
0
votes
1answer
52 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 ...
4
votes
1answer
132 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
0answers
124 views

My boxplot draws but the coordinates are NaN when I try to label the plot [closed]

I have been slowly getting my barchart with a boxplot to come together. My current project is to label the whiskers, quartiles and median. Using examples from the manual, no label is printed. This is ...
4
votes
1answer
100 views

Pgfplots grid lines to terminate at integer boundaries

Is there a pgfplots styling that I can use to get the grid lines to stop at integer boundaries and not extend from xmin ... xmax (and ymin ... ymax)? The desired output is shown on the right, which ...
3
votes
2answers
48 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, ...
3
votes
1answer
37 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
76 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
93 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} ...
3
votes
2answers
49 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
0answers
71 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 ...
2
votes
1answer
67 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
54 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
1answer
45 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
33 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
73 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
67 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 ...
3
votes
1answer
58 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 ...
6
votes
1answer
67 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 ...
1
vote
1answer
52 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} ...
1
vote
0answers
113 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 ...
4
votes
2answers
101 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 ...
2
votes
1answer
66 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 ...
3
votes
1answer
59 views

pgfplots build just hangs

I'm very new to using pgfplots, so maybe I'm just being impatient... Here's the first five lines of my data file, plusMethods.csv. In total, the data file has 58 lines. ...
3
votes
2answers
102 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) ...