{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

6
votes
1answer
105 views

Using PGFPLOTS to make vertical barchart with labels from data file

I have a version of this working with LaTeX Writer and PGFPLOTS 1.5.1 on my iPad. Moving over to Linux and TeXLive 2013 with PGFPLOTS 1.10 sees the Y AXIS LABELS disappear after the first. The bars ...
5
votes
2answers
72 views

Nodes near coord overlapping…how to shift up

I am using nodes near coords but as you can see the values on the bottom are overlapping. I have tried placing them manually but that hasn't worked either...How to just shift up the nodes so they do ...
5
votes
2answers
101 views

Recreate default colors

How is it possible to specific the colors shown in the sample plot here: The code is below and copied from the site! \begin{tikzpicture} \begin{ternaryaxis}[ ternary limits relative, ...
2
votes
1answer
89 views

How to programmatically coax pgfplots to recognize nan within surface as matlab does

I came across this post after wondering why nan's did not appear to be handled by pgfplots as they are by matlab when working with the matlab pcolor function. My typical workflow in this context is: ...
6
votes
1answer
43 views

Adjust markeredge style independent of line style in pgfplots

I'm struggling to get a NICE line plot with a dashed line and markers at the moment. I boiled it down in the following bit of code. There it seems that the line style (dashed) is used for the ...
3
votes
1answer
125 views

Changes in pfgplot barchart

I found many, many helpful things on tex.stackexchange for pgfplots - thanks for that! But i can't figure out how to: insert a new line after "without" or "with" hide value 0 or the whole bar ...
2
votes
1answer
48 views

pgfplots: options for marks do not apply

I try to modify the marks but the options do not seem to change anything?! \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \usetikzlibrary{plotmarks} ...
1
vote
0answers
58 views

pgfplots - How can I increase TeX's capacity for plotting large datasets? (TeX Live on Windows)

There are several questions and replies on this topic, yet so far I haven't found one which reliably details the steps for TeX Live and TeXstudio on Windows. Of course the editor might be an ...
2
votes
1answer
62 views

pgfplots - Is there an equivalent to 'cycle list name=color list' for custom lists?

I defined my own cycle list mycolor, which equals the vanilla color one except for 2-3 different colors and I added two more items to the cycle. The manual says on page 176: The cycle list ...
1
vote
0answers
47 views

Why these thin lines on a PGFPlot doesn't appear on some PDF readers?

I remember reading about PDF reader issues on this StackExchange, but I cannot find the links. The following TikZ picture has some thin lines in light green that doesn't show up on some readers (e.g. ...
14
votes
1answer
277 views

TikZ Plotting: Braces between tickmarks

What is the best way to draw braces between tick marks? It would be convenient to assign nodes at tick marks, is this doable? The best method for placement that I have right now is a guess-and-check. ...
2
votes
0answers
65 views

Can pgfplots perform nonlinear regression? [duplicate]

Can pgfplots do nonlinear curve fitting? In Excel, the fitting option is called log(agonist) vs response. I couldn't find an option in the regression section of pgfplots.
5
votes
1answer
132 views

Axis background shading overriding legend

This code in MATLAB: hold on h(1) = area([0 2.5], [125 125]); h(2) = area([2.5 5], [125 125]); set(h(1),'FaceColor',[1.0 0.8 0.6],'EdgeColor',[1.0 0.8 0.6]); set(h(2),'FaceColor',[1.0 0.8 ...
3
votes
1answer
47 views

PGFplots: no mark is showing up

I have standard deviation bars but there is no symbol mark. How can I get one to appear? I took the statistical code from TikZ: How to pass a specific table to \pgfplotstableset if used for ...
6
votes
2answers
325 views

Problems using \addlegendentry in a loop with pgfplots

I have some spectra to plot, which I exported from the Siemens Xray toolbox, which works nicely with pgfplots. Since these are multiple files that look the same I think I can do it with a for loop, ...
4
votes
0answers
63 views

Grouped overlay bar chart in LaTeX? [duplicate]

I have been trying to create a grouped overlay bar chart in latex using pgfplots, much like this one (not actually mine, found randomly on Google): What I'm trying to achieve is not a stacked bar ...
3
votes
1answer
80 views

Add legend to the curve from \draw

I am a new user to PGFPlots so I have the following question: I draw a ellipse in TikZ and I want to add a legend for it. However, I found the \addlegendentry is only for \addplot. Then, how can I add ...
3
votes
1answer
74 views

Set samples in tikzpicture from macro value

I'm trying to use set the amount of samples per tikzpicture globally: \documentclass{standalone} \usepackage{pgfplots} \pgfmathdeclarefunction{gauss}{2}{% ...
3
votes
1answer
139 views

2D Bar Chart in 3D Space

I have a graph in 3D space and I'd like to add a histogram along the vertical axis. The bars are supposed to be spaced equally along the vertical axis. I am, however, unable to get the positions of ...
3
votes
3answers
153 views

pgfplots + animate: complicated line-by-line animation

I want a retangle with 80 diagonal lines: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ %------------------------ %% Options ...
2
votes
0answers
40 views

Change unit from a read in data table

I use pgfplots to create a graph from a csv file. The column that I use for the x-axis contains time values measured in ms. As my timelapse is a bit more as a min I therefor have values between 1000 ...
3
votes
1answer
118 views

plotting the graph of hyperbolic tangent

Can someone help me to plot the graph of tanh in latex. I know I have to use pgfplot but I do not know actually how to use it. Any type of help is appreciated.
7
votes
1answer
138 views

pgfplot groupplot fillbetween

I am trying to use the fillbetween package with combined with groupplot and I am having serious troubles. Basically, what I want to have is the error plotted around my curves with a filled area. I am ...
0
votes
0answers
56 views

Stacked Barplot inside Table in Latex [duplicate]

I would like to plot stacked bar plot inside table in latex. I have code which plots two different bar plots inside table. But i want to plot single barplot with stacked bars. How can I do it in ...
0
votes
1answer
55 views

\label \ref pair in pgfplots does not work on running latex command second time

I am preparing a long document with Latex on Linux. The document uses lots of plots including 3D plots. Without externalizing the plots, latex gives me a message of memory problem. After much ...
4
votes
1answer
111 views

\addplot graphics: maintaining image's aspect ratio despite different scaling of axes

I have created a plot using a sophisticated program and would like to put the content of that plot into pgfplots' axis environment. Naturally, \addplot graphics is the way to achieve this. The Image's ...
2
votes
1answer
101 views

How to plot stacked bar plot inside table?

I have following code in Latex. Which plots only one data series (data2). I would like to plot staked bar plot inside table for both data1 and data2 with different colours. Any ideas.? Many thanks. ...
44
votes
4answers
5k views

3-dimensional histogram in pgfplots

I have a simple 3d histogram which I want to import into pgfplots, e.g. using matlab2tikz or by hand. PGFplots does not offer 3d histograms. Is there an easy way to do this?
2
votes
1answer
65 views

Marking axis in pgfplot

Welcome, I have this \documentclass[11pt,a4paper]{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \newcommand\two[2]{#2*exp(#1)} \begin{document} \begin{tikzpicture} \begin{axis}[ ...
1
vote
1answer
88 views

PGFplotstable: using a csv file with 4 columns

Suppose I have a csv file with no titles in it just data. The first column is time (x axis) and the next 3 columns each construct a different set; that is, plot(t, col1) is one set of data, plot(t, ...
3
votes
2answers
99 views

title in graphic with pgfplots

I have the following code: \documentclass[12pt,a4paper]{article} \newcounter{conto} \setcounter{conto}{\time} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} ...
4
votes
1answer
73 views

PGFplots: using the table feature

I have 4 sets of data that all have the same t values (x axis). Can all list be read in at once? \documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat = 1.10} \begin{document} ...
5
votes
1answer
103 views

TikZ/Pgfplots - Restrict error bars to domain

I would like to create a plot with error bars in which y is restricted to a given domain. Unfortunately, restrict y to domain does not seem to work with error bars. \documentclass{article} ...
15
votes
3answers
3k views

Image with axis

I need to plot some data in a file (10000 records of 2 points each one) but PGFPlots is very very slow rendering it. So I'm trying to use MatLab to plot the data, capture the image without axis and in ...
3
votes
1answer
104 views

Wrong linear regression computing

I've just started to use pgfplot and I'm actually trying to get the equation from a plot, with the linear regression. However, I'm working in a loglog plot, and the resulting regression equation is ...
5
votes
0answers
57 views

pgfplots using Time Series in .txt [duplicate]

I have the following Time Series data Date S 2010-01-11 7260 2010-01-12 7270 2010-01-13 7440 2010-01-14 7430 2010-01-15 7460 2010-01-18 7500 2010-01-19 7580 2010-01-20 7470 Where S is the ...
1
vote
0answers
109 views

Incomplete parametric curve, ''written letter e'' [closed]

I have tried plotting some parametric curves like (x^3-3*x,3*x^2-9), and it works fine. The following, however, does not work: (x-x/(1+x^2),1/(1+x^2). I have tried several ways of plotting it but the ...
6
votes
4answers
153 views

How to get multiple plots of particular functions?

I'm trying to understand how I can get multiple plots from a set of functions to be plotted in the same window without the clutter; i.e., border, axes, grid, whatever... For example, say I want the ...
3
votes
1answer
112 views

Linear regression in a loglog-plot with fixed slope

Goal: create a plot to compare the empirical convergence rate of a numerical method with the one expected from the theory. Accordingly, given a loglog-plot, I would like to add the line which has a ...
10
votes
1answer
3k views

How to change label and ticks of a pgfplots colorbar?

I have a 3d plot with colored surface and a colorbar made with pgfplots. My probably related questions are: How can I set the label of the colorbar? What are the equivalents of zticks (positions of ...
3
votes
3answers
150 views

Highlight a coordinate in a tikz / gnuplot graph

I want to place a coordinate on my tikz/gnuplot graph. How to do this? Preferrably I want the graph to overlap the little red dot, and I'd like the dot slightly larger. \documentclass{article} ...
7
votes
1answer
137 views

Multi-Line/Wave Generator Package for LaTeX?

I'm looking at my professors slides now: http://www.math.ucla.edu/~virtanen/40a.1.14s/schedule/lec1.pdf The first slides always have these intricate wave lines. If you Google search for "wave ...
5
votes
1answer
100 views

Centering dot in a tikz picture with specified coordinates

I’m trying to annotate the plot by drawing this dot on it. I specified the exact coordinates the center of the dot should be at, but apparently this isn’t the dots center... Is there a way to change ...
10
votes
1answer
371 views

Draw a spiral on a sphere

My goal is to visualize damped magnetic precession. Wikipedia features an image, but it doesn't quite capture one essential constraint. Namely, that the magnetization M should be normalized. So the ...
2
votes
1answer
126 views

Axis break in pgfplots - Large box around plot

I had the same problem as TSGM: Axis break in pgfplots I wanted to break the y-axis in a plot. I have tried the solution, which Michi had suggested on Axis break in pgfplots. It worked fine for me, ...
4
votes
2answers
121 views

Converting unit to coordinate works for x-coordinate, but not for y-coordinate

By Jake's help I received a solution (in principle) for an "older" version of this question here, i.e. to extract/convert units in the data to local measures. It works for x, yet unexpectedly fails ...
7
votes
3answers
224 views

PGFplots 3d: Creating a filled solid of revolution

I have searched through the internet for a solution, but since I'm not that skilled with pgfplots, I need your help. For several examples I want to draw solids of revolution, but filled ones. I ...
3
votes
1answer
74 views

Extracted coordinates have wrong value

I am unable to get the right coordinate values for (A) and (B) in the following axis. Did I misunderstand some conversion step or is it because of the data? Picture MWE \documentclass[ a4paper ...
4
votes
1answer
120 views

How to add secondary non linear scaled x-axis (1/x) for same data that does not align to linear scale (x) ticks

I want to plot Wavelength and Wavenumbers of one Dataset to one tikzpicture. I found stackexchange: How to have linked axes on plots? but I DONT want to have both axis-ticks aligned to same position. ...
7
votes
1answer
94 views

Placing node at path using `midway` in pgfplots

I thought my problem would have been possibly answered anywhere here, but I could not get it to work. Questions I consider linked to mine but which weren´t able to solve my issue are node placement ...