{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

2
votes
1answer
31 views

PGFPlot equally spaced coordinates

how can i make the plot that the provided x-coordinates are separated visually with the same distance. So instead of 0 500 1000 1500 2000 there should be 0 10 20 50 100 200 ... and the second thing ...
7
votes
3answers
141 views

pgf plot and foreach loop

I have this function y=a*x^2 where a changes (-2.4,-2.1,-1.8,....,2.1,2.4) and i want to draw it with pgf plots. Problem is i dont know how to implement this i think i'll need foreach loop or ...
3
votes
0answers
73 views

TikZ binomial distribution plus Gaussian approximation

My intention is to draw the probability function of a binomial distribution with trials = 20 and probability = 0,4. Then i wanna add the curve of an approximate gaussian curve in the same plot. How ...
2
votes
1answer
32 views

Pgfplots polar axis: can I draw angle labels rotated as for smith charts?

[This is a question which came up on the pgfplots mailing list. Since it might be of general interest, I post it here.] In pgfplots, the smithcharts library supports an option to draw the angular ...
0
votes
0answers
58 views

XML and LaTeX, including figures PGF plots

I am about to submit an article to a scientific journal. This journal provides some guidelines for those who want to submit the work in LaTeX. Requirements, however, are quite restrictive: Do not ...
3
votes
1answer
110 views

Undefined control sequence: \pgfmath@multiply@thousand [duplicate]

After updating my MiKTeX distribution, I suddenly got a compile error with a .tex file that compiled perfectly fine before. After removing everything that did not contribute to the error, I ended up ...
2
votes
2answers
71 views

Tikz addplot fill between depending on sign

i have following problem. I read data from a table and plot it and then fill the area between the x-axis and the curve. This works fine. Well at least a bit. I want the "negative part" filled in ...
3
votes
1answer
60 views

Appending arbitrary code to a pgfplots axis environment before curve and axes are drawn

There was some confusion about what I really wanted, so I include the actual use case here. The MWE plus corresponding picture is at the bottom of the post. I made some fancy looking graph, among ...
2
votes
1answer
49 views

How to make Loop?

I need to make for loop analog in LaTeX. My code has following form \documentclass[9pt]{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[scale=1.2, font=\tiny] ...
1
vote
1answer
66 views

Specify arc radius in coordinate systems units

This is a follow up on Specify radius of an arc with pgfplots and axis direction cs? If I'd like to change the MWE from there to the following: \pgfplotsset{compat=1.10} \begin{tikzpicture} ...
3
votes
1answer
35 views

Set PGFplots coordinate label using ifnum

I can't overcome this little nasty issue. Using \ifnum I set labels position around the coordinates in my pgfplot. This works fine but : I am only able to test if variable \coordindex is greater or ...
1
vote
1answer
43 views

Clipping only the bottom of a graph in pgfplots/tikz?

Is it possible to clip only the bottom of a graph? I have a graph with a node above the area of it; when clipping over the entire thing is enabled, the node is cut away. However, no clipping means the ...
2
votes
0answers
24 views

How can I make my pgfplots title multiline

I tried title = {really\\ long title} but it does not work. One thing that I find is working is to use title = {\parbox{0.4\textwidth}{\centering really long title}}. But this is not as flexible. Is ...
3
votes
1answer
23 views

change colour of the labels within istogram pgfplots

Given the following code snippet: \begin{frame} \titlesub \pgfplotsset{compat=1.9} \centering \begin{tikzpicture} \begin{axis}[ width=0.9\textwidth, ...
6
votes
1answer
81 views

PGFplots: How to add a legend to “superimposed” plots

I have "superimposed" different plots on the same graph (i.e., I have two axises environments in one tikzpicture environment.) Now I would like to add a single legend for both of the plots and ...
2
votes
1answer
39 views

Suppress auto axis range in pgfplots

I have an axis with two \addplot commands inside in pgfplots. Every \addplot command cause the axis limits to automatically re-arrange in order to show all the plotted data. I would like to suppress ...
0
votes
1answer
95 views

Which software should I use for making high quality graphs? [closed]

I have written a paper in MS-Word. Now, I am converting it into LaTeX. The problem that I am facing is about figures. Some of the figures I have converted using Adobe Illustrator. However, since I ...
5
votes
1answer
85 views

Logarithmic bar plot

I'm currently trying to create a diagram, with a logarithmic scale on y axis. This mostly works, except that the value of nodes near coords is wrong. Without ymode=log it shows e.g. 20551 as label. ...
1
vote
1answer
42 views

Drawing angles using pgfplots that are identical to angles using TikZ

I am using pgfplots to draw intersecting lines. Three right triangles are made by these intersecting lines - two of them in the third. I am trying to mark the two pairs of acute angles of equal ...
2
votes
2answers
50 views

Bar chart using pgfplots with both positive and negative bars

I am trying to create a bar chart with both positive and negative stacked bars. However, my negative bar doesn't appear/it is hidden behind the positive bars. How should I change the settings to make ...
-1
votes
1answer
133 views

Multi figure in one page

edit same as you but dont help------ \documentclass{article} \usepackage{pgfplots,tikz} \usepackage{caption} \DeclareCaptionLabelSeparator{fullstop}{.\quad} ...
2
votes
1answer
79 views

Legend and caption label of graph

I add 4 legend to my graph and different types of mark. Also, I want the legends to be under the X axis and in one line to each other. Position of legend Also How I can to write caption of this graph: ...
2
votes
1answer
57 views

yticklabels Problems

I'm going to draw a certain function from a .txt file. I'd like to specify/to highlight a point of that function on the function itself by a marker and a label. Moreover, I'd like to put a notch on ...
4
votes
1answer
102 views

Problem using atan in pgfplots

I'm trying to plot something using atan in pgfplots, but it always results in hundreds of errors. I'm using an example I found here: \documentclass{article} \usepackage{pgfplots} \begin{document} ...
0
votes
1answer
74 views

How do I create a certain graph using pgfplots?

I can't create this graph or something similar to it. I use pgfplots for plotting.
1
vote
1answer
52 views

Trim excessive whitespace from top of 3d pgfplots graph

Using the data in this file, I have the following plot: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{savetrees} \begin{document} \begin{figure}[b] \centering ...
5
votes
1answer
54 views

How can I have text along a path with pgfplots with marks?

I am using the decorations.text library to set text along a path drawn by pgfplots. The decoration works fine without marks, as suggested in this answer, but with marks on the path, the compilation ...
1
vote
0answers
51 views

How do I do a scatter with trend line?

I'm trying to remake this table from an article about Nested Containment List by Alekseyenko: I have a file with all my points in this format: 1183 0.561 1222 0.384 1473 0.425 1941 ...
4
votes
1answer
63 views

Defining a variable in Tikz and using it in a table

I read the page Define a variable in TikZ about how to define a variable in tikz, but I am trying to then put these values in a table and getting errors. It seems latex is not remembering the white ...
1
vote
1answer
62 views

Help drawing vectors in a PGFplots axis environment using calculated coordinates and \draw

Why does using \draw and calculated coordinates not follow what a graph of projectile motion ought to look like? Any suggestions for code that would work using formulas in coordinates? ...
2
votes
0answers
74 views

Convert image to code (TikZ? PSTricks?)

I have a ... pdf file, which contains figures of plots such as the following: Now the second plot isn't too hard to draw on TikZ (I assume... I hope? I don't have any experience apart from ...
3
votes
2answers
49 views

How to align two pgfplots that are overlapping?

I'm fairly new to pgfplots. I'm trying to graph two things, and have them plot side by side. However, when I use subfigure, my plots (and axes labels) overlap. How can I fix this? ...
1
vote
1answer
30 views

Pgfplot display only x axis, one value point with label and text

I want to plot a chart with one axis and draw a point at a specific value and show it with a label. In addition I'd like to place two label on the min and max tick of x axis. For q better ...
2
votes
0answers
21 views

Getting the same angle marks using pgfplots as those using TikZ

I am using pgfplots to draw intersecting lines. Three right triangles are made by these intersecting lines - two of them in the third. I am trying to mark the two pairs of acute angles of equal ...
6
votes
0answers
82 views

Plotting time series data

I would like to plot quarterly time series with special x-axis features. In particular, I would like to see small ticks indicating when the quarters begin and larger ticks indicating when the years ...
1
vote
1answer
96 views

Plotting a chart and chart line?

How I can Plot this curve in Latex {revtex4-1}? \begin{center} \begin{tikzpicture} \begin{axis}[bar width=18pt, xtick=data,ymin=0,ymax=45,x tick label style= {rotate=90,anchor=east}] \addplot[ybar] ...
3
votes
1answer
80 views

How to set intervals for step-like plot (`const plot`) in pgfplots?

How do I set the precise intervals that pgfplots should consider when performing addplot with the option const plot mark mid? For example: \documentclass{article} \usepackage{pgfplots} ...
-2
votes
1answer
92 views

Create graph in LaTeX writer [closed]

How I can to create this graph in LaTeX writer? Please send me code of this graph for LaTeX. Thank you.
3
votes
1answer
113 views

controlling pgfplots axis labels

I prepare Multiple Y-axis plot -4 Ys YY-YY But I have only one problem, I want my x number only show 0,4,8,12,20 time But when I write commander show me all from 0 to 20 How I will do this? ...
3
votes
2answers
219 views

Projectile Motion Diagram using PGFplots/tikz?

I'm making an equation sheet for my physics class (using LaTeX), and we're doing a section on projectile motion/vectors. Are there any suggestions for drawing diagrams using either plain Tikz or ...
1
vote
1answer
33 views

Erroneous graph, values are different but the plot is same, what to do?

Trying to plot some data from text file, the values are different but the plots overlap in the end result. The code is this: \documentclass{article} \usepackage{geometry} \usepackage{amsmath} ...
0
votes
1answer
39 views

Draw ellipse axis

I would like to plot an ellipse and its axis in a pgfplots axis. I tried using cross out but then it is diagonally crossed instead of horizontally and vertically. The axis I want are just straight ...
0
votes
0answers
51 views

Can I plot an average-line plot like this with PGFPlots?

I would like to create a plot like this (maybe a bit better looking - this is my attempt): Here is how the data for the plot looks: x,min,max,avg 0,800,3600,2628.571429 1.5,2000,3600,2942.857143 ...
1
vote
0answers
33 views

What exactly are the 'unsuitable tick labels' mentioned in pgfplots' compatibility warning?

When I use pgfplots, I get the following warning: Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing features). Consider writing ...
2
votes
1answer
31 views

Missing folder paths in tikz picture when loaded with tikzscale/standalone

I have a standalone mytikz.tikz picture which loads test.png. Both reside in the folder pics/. My main.tex, which uses tikzscale to load mytikz.tikz, is in the parent folder. Loading the test.png ...
0
votes
0answers
18 views

Lines plotted in front of others, though they should behind in a 3d plot

After converting a figure to TeX using matlab2tikz, I figured there's a little problem. The figure consists of many lines, but there are two different sets of lines a cloud set, forming a stream ...
0
votes
1answer
18 views

How to extract coordinate values from intersections in one \begin{axis} environment to use in a second \begin{axis}.. environment in pgfplots

I would like to plot two graphs, side by side, in two separate \begin{axis}...\end{axis} environments using pgfplots. In one graph I want to plot the n curves y1=x^2, y2=2x^2,..., yn=nx^2. I then want ...
2
votes
0answers
55 views

pgf plots, barplot, irregular spacing between bars/columns

I've created a (grouped) bar plot with three groups of bars/columns, but it would be great if the space between the first and the second group would be a bit larger than the space between the second ...
2
votes
0answers
32 views

pgfplots plot only odd 3d segments

Given a table of 3d coordinates like this: x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 I would like in a single \addplot3 command print the the segments that go from the 1st point to the 2nd point, ...
1
vote
1answer
47 views

How to label subfigures in Tikz package?

Making labeled subfigures is a bit tricky using the tikz package. Could someone please show me how to provide each subfigure its own letter (A for the left subfigure, B for the middle figure, and C ...