{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
70 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$, ...
0
votes
0answers
29 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} ...
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} ...
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 ...
4
votes
1answer
89 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
100 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
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$, ...
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 ...
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 ...
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. ...
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 ...
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 ...
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
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} ...
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. ...
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} ...
1
vote
1answer
91 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
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 ...
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 ...
3
votes
1answer
52 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
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
77 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
43 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
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
2answers
67 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
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 ...
2
votes
1answer
99 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 ...
0
votes
2answers
55 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 ...
2
votes
0answers
43 views

Adding Arrows and Text in tikz figure

I need your input on something again. I'm playing around with Tikzpicture and creating plots within the latex environment. I am trying to produce this graph (or something similar to this): So my ...
1
vote
1answer
58 views

multi-Figure with pgfplots with one legend and rotation

I would like to have in a page two figures like the one the code below at the same page using subcaption and sidewaysfigure. The first problem is that probably there is a mistake at the position of ...
3
votes
1answer
62 views

How to project nodes created by relative position on curve to axis and below?

In case I have two curves created with pgfplots I can draw a line between two relatively positioned nodes on each. In this example there is an arrow between the points at 50% of each curve. ...
4
votes
1answer
107 views

Vertical spacing and item separation between entries in pgfplots' legend

One could find a lot of questions on how to change the horizontal spacing between legend entries in pgfplots, but I can't find anything on the vertical spacing between the entries. For example, when ...
0
votes
0answers
66 views

How can I draw a 3D cross-section of a 3-torus embedded in 4D Euclidean space?

I found this question and very nice solutions of Mathematica Stack Exchange. I have a 3D-torus (\mathbf S^1\times\mathbf S^1\times \mathbf S^1) embedded in 4D Euclidean space. How can I draw the ...
3
votes
0answers
87 views

Drawing Cross Sections of (Contours over) Torus

I have this simple torus \begin{figure} \begin{center} \begin{pspicture}(-6,-4)(6,4) \psset{viewpoint=30 10 25 rtp2xyz,Decran=30,lightsrc=viewpoint} \psSolid[object=tore,r1=2.5,r0=1.0,ngrid=36 ...
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, ...
1
vote
4answers
105 views

Help with grid lines in a pgfplot (Version 3)

The following display is that of a line and of a parabola on the Cartesian plane with grid lines. The grid lines are drawn nicely ... but to draw the grid lines I have included the axis options ...
2
votes
0answers
51 views

'parula' colormap in pgfplots

I try to implement 'parula' Matlab colormap in pgfplots drawings. Here is the MWE for that palette with 10 points for interpolation: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{ ...
1
vote
1answer
73 views

How to remove 10^5 in x-Axis of time series plot generated with matlab2tikz

I generated the following simple plot in Matlab: Date=720000:730000 y=Date plot(Date,y) y=log(Date) plot(Date,y) datetick('x','yyyy') matlab2tikz('test.tex') which converts the date serial numbers ...
1
vote
1answer
46 views

External graphics + axis + additional plots

my issue is related to the sequence of layers in pgfplots. I have 3 layers: External graphics, which is included by \addplot graphics Axis grids and ticks Additional 'quiver' drawing from \addplot ...
0
votes
0answers
86 views

Customize PGF bar chart bars

Ideally, I'd like to write a macro which specifies how to draw the bar of a PGF bar chart, given its height, width, and location. This seems nearly equivalent to asking how to specify a non-repeating ...
1
vote
1answer
67 views

Help with Grid Lines in a pgfplot (Version 2)

This is a follow-up question to Help with grid lines in a pgfplot I edited the code in that post to get a grid on the Cartesian plane that is closer to what I want. Here is what I have. By ...
2
votes
2answers
64 views

PGFPlots: calculate a linear regression, ignoring some data

I know that I can use PGFPlots to calculate a linear regression with the create col/linear regression command. I have a set of data that is curved for the first few points, but linear for the ...