{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

4
votes
1answer
80 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 ...
4
votes
1answer
28 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 ...
1
vote
1answer
50 views

3d Graph Error with Plot

I have a problem with plotting a 3d-graph \begin{tikzpicture} \begin{axis}[ title=Exmple using the mesh parameter, hide axis, colormap/cool, ] \addplot3[ mesh, samples ...
1
vote
1answer
44 views

How to plot a table of data without printing the table?

So I'm having a little trouble with graphing from a table of data. So in a folder on my desktop, I have a ton of different LaTeX data tables that I converted from Microsoft Excel using Excel2LaTeX. ...
3
votes
1answer
38 views

Random plot based on a specific random seed

I would like to draw a set of random functions f(x) from point A to point B with a fixed random seed for each function. In other words, I would like to have functions which look the same each time I ...
3
votes
1answer
68 views

pgfplots and mathematical expression with coordinates list

I am trying to multiply the x coordinates of a plot by a certain factor. Section 4.3.4 from the pgfplots manual and this thread explain how to use mathematical expressions with data tables using ...
3
votes
0answers
32 views

number of samples for a function plot not working with pgfplot [closed]

I need to plot representations of the delta function on the same axis. \begin{tikzpicture} \begin{axis}[ xlabel=$x$, ...
2
votes
1answer
94 views

Pgfplots: Placing legends individually to the end of lines

I have a few days of experience with LaTeX. It seems almost everything is possible if you just find out how. So, here is a challenge... If a plot has many lines it is much more readable to have ...
0
votes
0answers
27 views

using tikzpicture environment in sharelatex presentation beamer

I want to show some plots in a thesis presentation . I made the graphs in a sharelatex thesis template, but the presentation beamer cannot compile me. please suggest me the usepackages to run it. ...
2
votes
1answer
59 views

How to plot the graph so that it doesn't touch the y-axis?

I have the following code and I would like to know what changes should I do so that the graph doesn't touch the y-axis: \documentclass{article} \usepackage{tikz} \begin{document} ...
1
vote
1answer
57 views

Typesetting the numerator and denominator in the same font as other characters in a node

In the display, I want the a and 2 in \begin{equation*} y=-\frac{a}{2}x^{2} \end{equation*} to be typeset in font=\footnotesize. \documentclass{amsart} \usepackage{mathtools,systeme,array} ...
1
vote
1answer
84 views

Getting the graph of a square root function using TikZ

I want the graph of the square root function to increase "slower" - maybe half the "speed." \documentclass{amsart} \usepackage{mathtools,systeme,array} \usepackage{tikz} ...
2
votes
1answer
50 views

How can i print the label of a subfloat inside a TikZ node?

I'm laying out a few tikzpictures side by side (made with pgfplots, but I think it should not matter). I'm trying to use the subfig package to be able to reference single subfigures. Everything works ...
5
votes
1answer
58 views

Making axes line up

I'm working on the following graphic: I would like the y axis of the plot in the upper right corner to line up exactly (i.e. have the ticks line up) with the x axis of the rotated plot to its left. ...
3
votes
1answer
70 views

pgf stacked bar plot not displayed correctly - wrong intersection with x-axis

I'm trying to generate a bar plot with the code below. As you can see does the bar plot not start at zero, as it should. It starts below zero!!! Can anybody help me? ...
1
vote
2answers
55 views

Locating tick marks at integral multiples of pi/2

Originally in my code, I had xtick={-2*pi, -(3/2)*pi, -(1/2)*pi, (1/2)*pi,(3/2)*pi, 2*pi}, to put tick marks at integral multiples of $pi/2$. It would not compile. I had to replace it with ...
2
votes
1answer
46 views

How to escape any CSV file automatically for pgfplots

I want to plot something from the file "processor.csv" from http://cpudb.stanford.edu/cpudb.1416196069.zip. How can I automatically escape this file or ANY OTHER to use it with pgfplots. I've already ...
2
votes
1answer
62 views

PGFPlots with custom minor ticks

How do you create a plot with minor ticks on the abscissa, when you've customized the major ticks? A MWE \documentclass{standalone} \usepackage{filecontents,pgfplots,pgfplotstable} ...
2
votes
1answer
65 views

pgfplot | tikzpicture | changing length + width of ticks

While there are any number of posts on how to fiddle (from the Latin) with tick labels, or tick placements, or tick color, I haven't been able to find anything (in terms of worked examples, or in the ...
3
votes
1answer
42 views

Adding a trend line to a bar chart

I'm very new to LaTeX, preparing my very first document in the environment and learning on the way. I've encountered a problem with one of my plots - I'm trying to add a trend line to a bar chart to ...
5
votes
1answer
159 views

Customize length of y major grids in pgfplots

Let's consider the example that can be found here: http://pgfplots.net/tikz/examples/cyclic-voltammetry/ (There you can find a MWE and the data for it) I would like to add some horizontals lines, ...
3
votes
1answer
99 views

Shading to indicate the solution set to a system of two linear inequalities in x and y

I am trying to show graphically the solution to the system of linear inequalities \begin{equation*} \begin{cases} 7x + 3y \geq 21 \\ -x + 3y < -3 \end{cases} . \end{equation*} There are some ...
3
votes
1answer
41 views

Runaway argument using int() function in pgfplots

The MWE below yields Runaway argument? 3\pgfflt@EOI \ifpgfmathfloatparsenumberpendingperiod \pgfmathfloat@a@Mtok \ETC. ./TeX-SE.tex:29: Paragraph ended before \pgfflt@readlowlevelfloat was complete. ...
2
votes
1answer
60 views

Labeling axes using extra x ticks and extra y ticks

I am trying to write code so that TikZ will compile it to label the axes with x and y using extra x ticks= and extra y ticks= in the same way that TikZ will label the axes using xlabel=$x$, ...
0
votes
1answer
42 views

Modifying some features in a scatter plot (Version 3)

Here is code that renders a scatter plot. There are only two typical modifications that I want. First, I want labels on the axes. In the axis environment, I have align=center,, ylabel = Number of ...
1
vote
1answer
34 views

Determining the type of node displayed using the \addplot command

I have a plot of a rational function. I use \addplots to plot one point on it. TikZ marks the point with a diamond. I want to mark it with a dot. How do I specify the options to make the dot the ...
1
vote
1answer
38 views

How to apply the same coordinate calculation for many \addplot commands in pgfplots

I have a whole bunch of data files that contain the output of a measurement program which are all of the same multicolumn structure and that I want to plot in the same way using pgfplots. Some of the ...
2
votes
2answers
65 views

Make parts of a pgfplots outside of the bounding box visible

I have created a graph with pgfplots and adjusted the bounding box to the axes. When I include the pdf of the graph in my main tex-document with includegraphics, I want to see the axes labels which ...
1
vote
1answer
43 views

combining two different graphs in a single pgfplot in LaTex

I have this two graphs made with pgfplot in ShareLaTex, my advisor wants me to show them in a single graph, the two plots will be recognized by solid and dashed lines respectively. also the legend ...
1
vote
1answer
47 views

tikz pgfplots: basic named dots in coordinate system

I know the following is a basic misunderstanding (headscratcher) on my part. I just want to place a few named points into an existing graph. The following is an excerpt: \documentclass{standalone} ...
2
votes
1answer
34 views

Specifying which user defined colormap to use in pgfplots

I have figured out how to define my own colormap in pgfplots. My understanding is that when I define my color map and I plot any graph that requires a colorbar, the default coloring scheme used ...
1
vote
1answer
58 views

Packages causes my code not to compile

The code runs fine until I add the two packages `\usepackage{tikz} \usepackage{pgfplots}` I am using TeXstudio 2.9.4. Here is a screen shot right after I run with the two packages. ...
0
votes
1answer
150 views

Option payoff diagrams in LaTeX

How can I generate an option payoff diagram such as this in LaTeX with PGFPlots or TikZ?
2
votes
1answer
48 views

How to prevent rounded and duplicated tick labels in pgfplots with fixed precision?

I have a plot whose y axis is linear with fixed precision and without scaling. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \begin{document} \begin{tikzpicture} ...
2
votes
1answer
57 views

Adding arrows to axes using pgfplots

Using axis lines=middle in the brackets after \begin{axis}, I can get arrows to appear on the x and y axes of a graph in the positive but not the negative direction. How do I add arrows in the ...
5
votes
1answer
96 views

Creating interactive plots in tikz with pop-ups

I'm trying to create a 2-d plot in LaTeX. I am facing two issues: I am using the ocg package to make the plots appear/disappear by clicking on the legend. It partially works as the markers in the ...
1
vote
0answers
40 views

How do I place table below plot so that category matches axis ranges?

Here is something that I'm trying to do is to align my table with x-axis category or range so that column below the x range is corresponding of the data So As example is shown, I want to create ...
4
votes
2answers
104 views

Plot file could not be opened

The following code is from the "gallery of examples in the manual - PGFPlots". \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \pagestyle{empty} \begin{document} ...
3
votes
1answer
51 views

Draw grid lines for grouped bar chart/diagram

Me again.. I have a grouped bar chart and I would like to add vertical grid lines for each group because with a smaller width all bars are too close to each other making it hard to look at. My MWE: ...
0
votes
2answers
54 views

Modifying some features in a scatter plot (Version 2)

I have a scatter plot that needs some modifications. Why isn't O being typeset with the command \node (origin) at ($(O)+(225:10pt)$) {$O$};? I would like O to be typeset in the same font as the tick ...
3
votes
1answer
72 views

Plots large number of data

As you all know, TikZ has to face the limits in terms of memory, that is given by the TeX compiler. For most of my plots, I have a maximum time step of around 1us and I record several waveforms over ...
1
vote
0answers
53 views

Why can't I plot (x+2)^{1/3} properly using pgfplots? [duplicate]

I'm using the code \documentclass{book} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ xmin=-5, xmax=5, ymin=-5, ymax=5, axis x ...
1
vote
0answers
74 views

Drawing a solid angle vector/cone in TikZ?

I would like to draw a "solid angle vector/cone" pointing in a specified direction in spherical coordinates and having a specified opening size (dσ or a in the examples below), akin to the examples ...
3
votes
0answers
59 views

How to label areas in pgfplots fillbetween library

Is there any simple way put a label say $A$ roughly at the "center" of an area created by the pgfplots fillbetween library? Take for example the following example: \documentclass[tikz]{standalone} ...
2
votes
1answer
42 views

Use separate colors for a multi-bar diagram plotted from file

Based on my origin question here: Broken bar diagram with tikz package I am trying to color each single of a group differently. In my preamble I have defined the colors I want to use: ...
2
votes
2answers
173 views

Modifying some features in a scatter plot

I would like to have the following modifications to the scatter plot. The title should be typeset on two lines. I would like a break on each axis indicating a skip from 0. (When I was in junior ...
2
votes
1answer
24 views

How to set the color and width of your plotline using the third column in your table?

I would like to use the third column in my table to color code my plotline e.g. blue-red (-1 to 1) and set the width according to the absolute value of the third column (0 thick, 1 ultra thick (or ...
2
votes
1answer
96 views

Broken bar diagram with tikz package

I am trying out tikz package to create bar diagrams and following the code example in the manual on page 82 ...
2
votes
2answers
69 views

Can we get references into externalized pgfplots images to work?

I have some plots created with TikZ and pgfplots. In the captions, I use \ref{...} with plot labels in order to get the marker printed there; a neat feature indeed. Now, when submitting to arXiv one ...
1
vote
0answers
41 views

Bar graph with large points

I want to plot a bar chart with 128 points with 2 in a group but the vertical bar overlap each other and representing in a square plot but i want in a rectangle plot, (where the length of x-axis is ...