{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
51 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
45 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
52 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
44 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
51 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
59 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
67 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
103 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
43 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
65 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
116 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
63 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
86 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
99 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
47 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
26 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
78 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
47 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
121 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
58 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
49 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
76 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
72 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
156 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
81 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
97 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
177 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
113 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
78 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
88 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
50 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
94 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
81 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
73 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 ...
3
votes
2answers
185 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 ...
3
votes
1answer
70 views

Using a character as mark in pgfplots

I have a scatter plot in pgfplots which shows dots in 4 different colors belonging to 4 different sources. I would like to use a character (e.g., "A") instead of a circle as the marker. For instance, ...
3
votes
1answer
83 views

Oriented curves

Can someone link me to a tutorial or some examples of how to make oriented curves using pgfplots? Something along the lines of I'm not asking for someone to spend the time reproducing the above ...
1
vote
0answers
42 views

How to label data with the real value in pgfplot?

Taking this example from PGFplot gallery. \begin{tikzpicture} \begin{axis}[ x tick label style={ /pgf/number format/1000 sep=}, ylabel=Population, enlargelimits=0.15, legend ...
2
votes
1answer
91 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 ...
2
votes
1answer
44 views

PGFplots within Environ format mistake

I try to write an environment for a simple barplot with pgfplots to reduce the needed markup. For that I use the environ package. For some reason tikz complains about a format mistake at the ...
2
votes
0answers
43 views

How to set axes limits for two types of plots when using groupplots

I have a rather big figure with two rows of plots where the first row has one y-axis and the second row has another y-axis. I would like to set the axis limits for these two sets of y-axes without ...
2
votes
1answer
124 views

How to draw a graph from specific lines of CSV file?

I would like to know if I can use cases when taking input from a csv file: Instead of generating multiple csv files, I would like to do the following In my tex file: Input from line 1-10 of ...
2
votes
1answer
125 views

Help with grid lines in a pgfplot

Nothing exciting here. I have a plot with xmin=-11, xmax=11, ymin=-11, and ymax=11. I would like to use the grid option in the axis environment to draw a particular grid. All horizontal and ...
2
votes
0answers
85 views

Legend entry for each point in scatter plot with matching color

I have a file with multiple columns, of which I create scatter plots where positions are given from column 1 vs column 2, while the mark color is based on column 3. I now wish to automatically create ...
3
votes
3answers
81 views

Pgfplot logaxis customization

I am trying to reproduce the following picture: but currently I am able to: There are a lot of issues: log scales are not logarithmic, i.e. 256, 512, 1020, 2050. I would like to have 256, 512, ...
1
vote
0answers
24 views

pgfplots decimal seaprator for extra ticks

I'm trying to format all y tick labels in a pgfplotsplot so that comma is the decimal separator. What I've tried is: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat = 1.12} ...
1
vote
0answers
61 views

pgf-plot: y-axis shows comma instead of decimal point

The ticks of the y-axis have to be displayed with a decimal point instead of a comma. I have no idea how to do that. I'm using \usepackage[english]{babel} and even the commad \decimalpoint does not ...
1
vote
1answer
52 views

putting(-) sign in the axes and working out a graph in pgfplots

I need pgfplots to show (-) sign in the y axis, somehow it does not read it. \documentclass{article} \usepackage[margin=0.5in]{geometry} \usepackage[utf8]{inputenc} \usepackage{textcomp} ...
1
vote
1answer
93 views

PGF colorbar cuts off max value

I need to generate a whole load of colorbars with custom min and max values. From reading this SE I have managed to get this working: \documentclass{standalone} \usepackage{pgfplots} ...