{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
34 views

pfgplots plot in degrees

Everywhere on the web, and in this forum, tells me pfgplot plots trig functions in degrees, which is what I'm after. Here is the code for my graph: \begin{figure}[H] \centering ...
3
votes
1answer
33 views

adding single points to bar figure in pgfplots

I have a bar plot, in which I would like to add some single points overlayed on the bars. Those points are in another scale compared to the error bars. Below, I'm illustrating those single points in ...
1
vote
1answer
31 views

Issue in plotting a grouped bar chart

I was getting the X-axis labels to be printed without spaces. There is an issue with legends, it is in the way of the delay values How do I keep the values horizontally and enlarge them for better ...
2
votes
1answer
34 views

Reason for multiple bars in Legend entries

I am have a similar Grouped Bar Chart as shown in this question and wish to know why there are multiple bars in the legend entry. Is it possible to modify the legend so as to consolidate these bars? ...
13
votes
1answer
158 views

Non-slanted (siunitx style) unit prefixes with pgfplots

I've taken the example from the pgfplots manual on Preset SI prefixes and modified it slightly, changing a prefix from milli to micro. The result is that the units of the yaxis are stated as ...
3
votes
1answer
62 views

tikz, pgfplots and polaraxis

I found a nice template for a polar graph 1 and I adjusted it as follows: \documentclass[12pt]{standalone} \usepackage[x11names]{xcolor} \usepackage{tikz} \usepackage{pgfplots} \begin{document} ...
1
vote
0answers
29 views

Zero space between bars of the same interval in pgfplots ybar interval plots

I need a bar plot (containing multiple \addplot) with following requirements: ticks between x labels (and, in this respect, my question differs from Adjusting width of ybar interval separator to ...
2
votes
2answers
48 views

Print comma instead of period in node near coord

I need to print the Y-values for each point with a comma for decimal seperator. See my MWE. The data is provided as a .csv within my folder. \documentclass{standalone} ...
4
votes
1answer
121 views

Build a histogram with the option hist={bins=7} in pgfplots

The data values fall into the range [800,3200] which is partitioned into 7 intervals of equal lengths (300). Also, I would not want the y axis but only the grid. There should also be a legend to ...
0
votes
0answers
42 views

Tikz/pgfplots problem: change x-axis counting at certain x-coordinate

In order to create a particular diagramm, I need the possibility to change the x-axis-counting at a certain x-coordinate so that x runs from 0-10 in steps by 1 and then changes at 10 put in further ...
2
votes
0answers
44 views

What are the minimum requirements to create a “standalone” installer for pgfplots?

I prefer to use pgfplots for my plotting needs, but I tend to use LaTeX for my documents as well, so I have the full TeX Live installed. I'd like to convince my friends/lab mates/colleagues to use ...
1
vote
0answers
48 views

pgfplots: Distributing random points on surface

I want to distribute some random points on a surface. My working example looks like this: \documentclass[border=2pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \usepackage{tikz} ...
4
votes
1answer
75 views

Box plot with pgfplots package

I did my first box with pgfplots package. I have several questions : How to write numbers without commas with a thousands separator ? How to have a larger distance between the box and the x axis ? ...
2
votes
1answer
15 views

Conditional \addlegendentry

How can I add legend entries dependent on some variable? At least it does not work in the minimal example below. \documentclass{standalone} \usepackage{tikz,pgfplots} \begin{document} ...
4
votes
1answer
81 views

tikz not drawing the correct function

In an attempt to make a graphic of Gay-Lussacs Law, I made this graphic. I've managed to draw the measure points, but the function corresponding with it (which I did with my TI-nspire) is not drawing ...
4
votes
1answer
54 views

pgfplots, TikZ interoperability and axis equal

Sec. 4.27 of the pgfplots manual explains how to match pgfplots and TikZ unit vectors and origins. It suggests: Configure matching unit vectors by means of the x and y keys. The default ...
3
votes
0answers
26 views

Parsing CSV with comma as decimal separator in pgfplots [duplicate]

How can I plot data from CSV file when comma is separator of decimal part? Part of my CSV file: U f(U) 0 6,12323399573677E-016 0,1257 1,2536924115 0,2514 2,4876019375 I've tried this trick but it ...
0
votes
1answer
39 views

General understanding \addplot3 pgfplots

If I type into wolframalpha.com "3dplot (x+sin(x))^2" I get . When I use pgfplots and do this: \addplot3[ surf, opacity=0.8, samples=50, samples y=30, colormap/whitered, domain=-1:1,y domain=-1:1, z ...
2
votes
2answers
44 views

Change legend color in multiple y-axis plot in pgfplots

I have a plot in pgfplots with two y axis, and two curves for each axis. For each y-axis, the first curve correspond to a given method, and the second one to another method. Hence, the two curves ...
1
vote
1answer
56 views

4 x-axis with pgfplots

I'd like to put 4 x-axis on a same plot, with different scale. y-axis will be the same. I'd try to put several \begin{axis} ... \end{axis}, but they appeared on the same location. Here, I tryed to ...
0
votes
1answer
30 views

legend over the plots

I don't want to have the legend over the plot as shown in Figure. I want it inside the figure box but not over the plot. Also, the number format of y-axis, i want to have it 0.001, 0.002, etc. The ...
1
vote
2answers
46 views

Applying log on a column read from file

I'm trying to plot some data from a file and I want to apply the natural log on the values from one column. MWE: \documentclass[a4paper,12pt]{standalone} \usepackage{pgfplots} ...
3
votes
0answers
51 views

Uniformly spaced line markers

I'm reading line data from file and plotting it. By default, the curve has markers, where are the original data points. The data points are very uneven, but I would like to have evenly distributed ...
0
votes
0answers
47 views

Resize tikzpicture without change \node position

I'm using tikzpicture to create some graphs. But I have a problem, when I change graph size for better position on text, all \node goes to wrong position. Here is my code. This are my .dat. ...
3
votes
2answers
68 views

Changing the arrow heads in pgfplots axis lines

Consider the following: \documentclass{article} \usepackage{tikz,pgfplots} \usetikzlibrary{arrows.meta} \tikzset{>={Latex[round]}} \begin{document} \begin{tikzpicture} \begin{axis}[inner ...
0
votes
0answers
41 views

Help to change important parts of figure [on hold]

I am very sorry, again to present my question, but for me its very important -this graph is important part of my dissertation. Can you help to parallel correlation of two Y axis-that mean I want my ...
8
votes
8answers
634 views

Drawing minimal xy axis

can anybody help me to draw this minimal example of an xy axis? I couldn't find anything similar on the forum. The axis should be black but the grid behind it a shade o gray, dashed. It would be ...
0
votes
1answer
32 views

Caption/Space problem in tikz/pgf/subcaptionbox

I plot 4 Graphs with Tikz and use subcaptionbox. Following badnesses occur: (1) There is no space between the caption of the upper figure to the figure below. (2) The second figures (b) caption ...
2
votes
1answer
37 views

aligning plots in pgf plots and a couple other associated questions

I am fumbling my way through pgfplots. I have 3 plots on a page. I have a few issues: The bars in the plots are floating above the axes to various degrees. How do I anchor the bars down to the axis? ...
6
votes
1answer
78 views

Enlarge distance between bars

I want to create a bar chart. The bins are extremely close to each other, how can I increase the distance between the bars to let the labels on top of it stand a bit free and don't overlap anymore. ...
5
votes
1answer
63 views

TikZ + PGF function Plotting: Is there a max(a,b) function?

I am trying to plot a function with TikZ and PGF. This function contains a max operator (returning the greater value of the given two parameters). I want to do the following: \documentclass[ ...
6
votes
1answer
60 views

Restrict x domain to several regions

I want to plot a graph and show only the low x-positions and the high x-positions. Right now I use two times \addplot with restrict x domain to achieve this: \documentclass{standalone} ...
4
votes
1answer
65 views

To fill legend mark in graph

How to fill mark, such as zebra: same in my uplod picture which draw. Thanks \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{etoolbox} ...
3
votes
1answer
65 views

Parallel correlation of two Y axis

Can you help to parallel correlation of two Y axis-that mean I want my third Y axis 0 number begin parallel to second axis number 3. Yes, I know may be I explan in bad english, because I draw picture ...
2
votes
0answers
55 views

Grouping bins in bar charts?

I have below bar-chart. I want to group the bars together by color. It makes no sense to compare the bins directly, but only the values with the same color directly. Is there a way to create two ...
1
vote
0answers
66 views

standard deviation in latex graph

How can draw standard deviation in latex graph(excel command stdev) \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{caption} % <---- \captionsetup{font ...
1
vote
1answer
68 views

Compile timeout [closed]

When I use my code, always say that-compile timeout-www.overleaf.com/ I am check two times my code and dont finde any mistake \documentclass{article} \usepackage{pgfplots} ...
0
votes
2answers
43 views

Y-tick labels on the right side, y-axis label on the left

Is there a way to only move the y-tick labels to the right? The option yticklabel pos=right automatically moves the axis-label, too. Here a MWE of how the axis-label is also moved: ...
1
vote
1answer
40 views

Putting space about labels for vertices and shifting these labels

A line is drawn through a side of two triangles. One of these lines are drawn on top of the labels B' and C' for vertices of one triangle. I used the option inner sep=2pt to put some space about ...
2
votes
1answer
70 views

Drawing lines half the thickness of the default thickness

In the following code, two triangles are drawn - one is the reflection of the other across the line y=x. I would like to have a line, with the command \draw[loosely dash dot], drawn either half or a ...
0
votes
0answers
42 views

A line not plotted

Here, I am trying to get TikZ to plot the line y=x. I get an error. \documentclass[10pt]{amsart} \usepackage{tikz} \usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings} ...
0
votes
1answer
41 views

A line is not plotted

I have a plot of a triangle and its reflection across the line y=x. The code is not compiled because there is an error in the command to plot the line y=x. Here is the command. ...
3
votes
1answer
96 views

How to plot sinusoidal and absolute functions?

I have to draw this diagram with plots of these three functions: The code I already have is \begin{tikzpicture}[scale=0.75] \begin{axis}[xlabel=$t$,ylabel=$x(t)y(t)z(t)$,xmin=0, ...
6
votes
2answers
118 views

How to place y ticks' labels inside the bars?

I have been trying to find how to I place the y ticks Normal and Special inside the bars rather than to the left of the bars. Below is the code of the most recent attempt: \begin{tikzpicture} ...
4
votes
2answers
64 views

Problem with tikz : alignment of figure when using bracket in xlabel

When I put bracket in a xlabel, the alignement of my figure change. It's just a little move, but it's uggly because i put two sub figures side by side. Do you know how to solve this ? Thanks in ...
1
vote
1answer
25 views

How to customize only one node near coord?

\documentclass[border=2pt]{standalone} \usepackage{pgfplots,tikz} \pgfplotsset{compat=1.11} \begin{document} \begin{tikzpicture} \begin{axis}[ symbolic x coords={Germany,Spain,UK}, ...
4
votes
1answer
31 views

How to customize only one coord?

\documentclass{standalone} \usepackage{pgfplots,tikz} \pgfplotsset{compat=1.11} \begin{document} \begin{tikzpicture} \begin{axis}[ symbolic x coords={Germany,Spain,UK}, ...
2
votes
1answer
75 views

pgfplots significant figures

I'm trying to work out how to change the number of sig figs in the axis labels. I.e., I want the graph to display 0.0, 1.0, etc. Any ideas? \documentclass{memoir} \usepackage{pgfplots} ...
3
votes
1answer
72 views

use axis of original plot in \spy plot

I use \spy in an plot. This works generally, but I want the axis in my magnification too. I attach a picture to clarify. I do not want to do this with a \node and manually calculate and add the axis ...
0
votes
0answers
38 views

TikZ Externalization Cannot Find Output File

I tried to use TikZ's externalization feature to speed up my compiling time, but for some reason it did not work as expected. This problem seems to be quite common and I've spent some time looking ...