{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
62 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
100 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
61 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
98 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
111 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
91 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
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 ...
1
vote
1answer
64 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
37 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
93 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
51 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
55 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
108 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 ...
1
vote
1answer
61 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
51 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
55 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
121 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
40 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$, ...
0
votes
0answers
37 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
61 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
61 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
110 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} ...
1
vote
2answers
78 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
52 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
97 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} ...
3
votes
1answer
63 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 ...
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
1answer
117 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 ...
2
votes
1answer
80 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$, ...
1
vote
1answer
63 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 ...
0
votes
1answer
49 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 ...
3
votes
1answer
61 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. ...
1
vote
1answer
50 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 ...
1
vote
1answer
66 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 ...
2
votes
1answer
53 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

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} ...
1
vote
1answer
60 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. ...
2
votes
1answer
79 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} ...
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.
1
vote
0answers
46 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 ...
2
votes
1answer
76 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
125 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 ...
3
votes
1answer
78 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: ...
3
votes
1answer
101 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
54 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
111 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 ...
2
votes
1answer
57 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
1answer
27 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
2answers
95 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
0answers
48 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 ...