{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

0
votes
0answers
2 views

Error: pgfplots colorbrewer

I am trying to use the new colorbrewer library and get the following error: Error: I do not know the key '/pgfplots/colormap/YlOrBr' and I am going to ignore it. \documentclass{standalone} ...
0
votes
0answers
8 views

How can I choose a column of dat file to plot in pgfplot?

I have dat file (output from Matlab) and it has four columns. How can I choose my desire column to plot in pgfplots. \documentclass{article} \usepackage[active,tightpage]{preview} ...
3
votes
0answers
53 views

Plotting the sum of a function in TikZ

I am trying to plot a function that is the sum of another function based on the parameter. A famous example of this is the "sum of squares", however the functions I really want to do this do not have ...
2
votes
1answer
43 views

Label axis in units of pi (or pi/2) and use minor tick num

Using pgfplots, I often want to label the horizontal axis major ticks in units of pi or pi/2, or pi/3. Is it possible to have such "trigonometric major ticks" use minor tick num = <value> to ...
0
votes
0answers
22 views

How to plot the solution to a non-linear ode?

Im currently completing my dissertation for undergrad maths, and need to plot a graph showing solutions to the ODE: dN/dt=rN(1-(N/N_0)) I would ideally want to plot three or four variations of the ...
1
vote
1answer
49 views

Add “sections” to a staked area chart

In This question I have exposed the original problem, inspired in the answer given by Carina I started to work in some solution, but it is still not 100% right. Based on this meta I have decided to ...
2
votes
1answer
44 views

Help with Plotting Logscale?

I'm trying to plot the time complexity of some sorting algorithms using a log scale. I'm fetching the data from a text file insertion.dat which contains the following information: x y 0 0 10 0.002 ...
2
votes
0answers
62 views

How to make 3D ribbon plots in PGF/TikZ

I'd like to make a bunch of 3D ribbon plots in TikZ or PGF, I've taken a look around and I've found no hints on how this might be accomplished, is there a simple way to do this? I'd settle for a 3D ...
0
votes
1answer
39 views

scale bar figure - showing scale with citations

I am attempting to make figures similar to this: with latex. I would like for the citations to work in order to match the observed data from where it came. Does anyone know of a good package ...
2
votes
2answers
67 views

How to scale the colorbar to data in pgfplots

Good morning, I have some .txt files that contain 3 columns of data: the first one corresponds to the x-axis value of each point, the second one corresponds to the y-axis value of each point, and the ...
7
votes
2answers
66 views

pgfplots: tick marks on axis with fill between

I am plotting a graph and shading some area beneath it using fill between like in this example: \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} ...
4
votes
1answer
64 views

Barplot orientation -

I am new to creating graphs with Latex. The graph on the right is the original graph, I then decided it would look better if I change color for each classifier type and add the value of the bar on ...
1
vote
1answer
31 views

Automatic position of variable name in axis with pgfplots

I am looking for a code - probably inside {axis}[options] - that automatically puts the variable name (for example, x, and y) at the end of each axis. I am aware of the method to do this manually, ...
1
vote
1answer
36 views

Reading xticklabels from a csv

I need to display the labels in AgentTypesS column in my barchart. This is an excerpt from my .csv file (Yes, it is an uneven file) AgentTypesL, OriginalL, MergedL, DifferenceL, ...
5
votes
1answer
56 views

Drawing solid-circle or dots in legends

I'm trying to create plot with solid circles in the legend. Please see the image below for what I've got so far: I'm unable to get my legend right, ideally I would like to draw solid red circle ...
3
votes
1answer
80 views

How to control where curves are in tikz

I am attempting to draw the following graph in tikz. My attempt so far has gotten me to here. \documentclass[border=3mm]{standalone} \usepackage[dvipsnames]{xcolor} \usepackage{pgfplots} ...
1
vote
2answers
69 views

Two Piecewise functions in a same plot

I am both new to LaTex and to tex.StackExchange. I am currently taking a course in Game Theory and I am using Latex to type my class notes. So far, I have been using this website to solve my doubts ...
1
vote
1answer
66 views

Automatically generate the value table of a mathematical function

Is there an easy way to get the value table of a mathematical function? Consider the following example and pseudo-code: \documentclass{article} \usepackage{pgfplots} \usepackage[nomessages]{fp}% ...
3
votes
1answer
33 views

\textdagger and related symbols give error in point meta=symbolic in pgfplots

When using \textdagger in point meta={symbolic=\textdagger} this gives me an error when compiling ! TeX capacity exceeded, sorry [input stack size=5000]. \curr@fontshape ->\f@encoding ...
3
votes
0answers
37 views

Find product of shifted plot and other plot in pgfplots

In the MWE, I shifted the blue plot to the left. How can I now plot the product of the shifted plot (in cyan), and the blue plot? Here is the code I have thus far: ...
2
votes
1answer
36 views

Specify custom ticks in dateplot

How to correctly specify ticks in date plots? I tried \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \usepgfplotslibrary{dateplot} \begin{document} %\begin{tikzpicture} ...
2
votes
0answers
43 views

stacking histograms in pgfplots

The stacking is not working correctly. This is what I get: This might be a problem of different bins, but even restricting them is not working (slightly related questions about common bins are ...
3
votes
1answer
36 views

pgfplots: loglogaxis dual axis tick transform

I have an image I'm trying to recreate in pgfplots. We have a loglogaxis plot, onto which we would like to add an extra set of axis to show what these values correspond to under a simple ...
0
votes
1answer
36 views

PGFPlots: How to add a legend entry from a macro into a foreach loop?

I'm doing a stacked bar plot where each plot is taken from a different column of the same file, and I have the list of column names I want to use in a macro: \newcommand\tools{tool1, tool2, tool3, ...
5
votes
1answer
144 views

How to modify a mobius strip?

I have modified some mobius code by Jakes to produce another mobius strip. Could you please help to make it more like the second photo below in overall appearance? \documentclass{standalone} ...
2
votes
1answer
35 views

Pgfplots: restrict to domain when using date coordinates

I would like to restrict the domain of the x axis while using date coordinates. However, the following example (modified from pgfplots manual) will not compile since the domain boundaries for the ...
4
votes
2answers
78 views

How to resolve conflict between versions of TeXLive and pgf?

To resolve the problem I described here, I need to use pgfplots version 1.13, which required that I updated to TeX Live 2015. Doing so lead to a problem with the command \heightof as can be seen by ...
0
votes
1answer
30 views

How to unstack grouped bars in pgfplots bar-charts

I am sure this is quite a trivial problem, but I cannot seem to figure it out. I have a bar-chart with preferably three groups of four bars. The thing is, using the MWE below, the four bars per group ...
1
vote
1answer
35 views

Animate several pgfplots with different value

I have come to look on how to draw a student law with Tex and I have been very pleased with the first answer I found here Nevertheless, I found that the animation displayed in the first answer is ...
0
votes
0answers
30 views

Precompile pgfplots

I have a latex document that includes a lot of plots built with pgfplots. As of now, I just include a tikzpicture that loads the plot data from a CSV file. This is starting to take up quite some time ...
1
vote
1answer
30 views

Matlab2tikz breaks major tick weight

matlab2tikz breaks my tick weights on both x-and-y axis. The figure in MATLAB looks like following. After running it through matlab2tikz with all possible known options of ExtraAxisOptions, I ...
3
votes
1answer
79 views

Basic Bar Plot with long text legend, horizontal guides and percentage values

I am new to pgfplots and actually I want to create something pretty basic. Yesterday, I started modifying my chart with the help of the pgfplot manual and the help of Google but unfortunately, I ...
2
votes
1answer
44 views

How to have unconnected points on a plot?

I'm trying to create a graph which has all of the datapoints from an inline table plotted, without a line connecting them, but still having the points on the graph. The issue with the MWE is the line ...
2
votes
1answer
50 views

2x2 Array of PGF Plots

How would I properly layout 4 PGF plots on one page. Currently I have the plots spaced horrifically, and am not sure how to correct the problem. Ideally, I would like all 4 plots on one page, but even ...
2
votes
0answers
57 views

Why the `.tex` file is running indefinitely in PdfLaTeX?

I am using the following code to plot a set of graphs from the experimental data given in book1.txt. This .txt file is also kept in the same folder along with .tex. My book1.txt file is A B ...
2
votes
1answer
52 views

Place multiple external images in a PGFPlots axis from a PGFPlotsTable

I am trying to create an environment in which I can place several georeferenced images into a PGFPlots axis. I have working code that reads in the specified image, reads in the world file (a text ...
4
votes
1answer
51 views

Problems with pgfplot and multiple graphs

I've been trying to do this there's a few days and the following code was the best that I got until now. This is supposed to be one graph; Because I say axis y line=none the last three "blocks" of ...
3
votes
1answer
79 views

How to approach the drawing of this sort of scatter plot?

I'm trying to plot a data set that contains the results of some benchmarks across a number of tools on a set of input files. The problem is that there are more than 3000 test cases and I need to ...
3
votes
2answers
102 views

Dimension too large with \pgfmathsetmacro

I want to define varafterglowepsdown, varafterglowa and varafterglowb and use them in a tikz function like this: \newcommand{\varafterglowepsdown}{0.0001} ...
1
vote
1answer
58 views

How to draw stacked area chart

I want to plot a stacked area chart. Stacked area chart => All values get stacked and the areas under the lines get's colored. Something like this: My data in a minimalistic example: ...
2
votes
1answer
40 views

Forget used ticks

This is a follow-up question of pgfplot dateplot discrete dates on axis, which is answered by Peter Grill. The solution for plotting discrete dates is to use only unique dates. However, when making ...
4
votes
1answer
48 views

Producing x and y-intersections automatically

How does one produce a picture of a function (say, a polynomial) and indicate the $x$- and $y$-intercepts automatically? I have some code that produces 1 of the $x$-intercepts and the $y$-intercept, ...
2
votes
1answer
40 views

How to add two waveforms in pgfplots

In my example code given below, I have two plots. I wanted to add a third and fourth plot that is the sum and then product of the original two plots. Is there a simple way to do this in pgfplots? ...
3
votes
1answer
86 views

Bar diagram strange behaviour

My code is: \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[title = some title, xbar, y axis line style = { opacity = 0 }, ...
4
votes
2answers
38 views

Alignment of nodes with \addplot table

In the MWE below, I would like the nodes to align vertically. Giving them the same pos doesn't seem to do that. I can try to align them by adjusting the pos using trial and error but this is tedious, ...
4
votes
1answer
57 views

pgfplots layer issue

I'm trying to define my own layer set which enables plots above gridlines, but below the axis lines, ticks, etc. I've made the MWE based on chapter 4.27.2 of the pgfplots manual. However it's not ...
3
votes
0answers
87 views

Position of y axis with pgfplots

I am currently trying to create a plot with pgfplots and can't seem to properly position the y axis like I want to. Here's my MWE: \documentclass{standalone} \usepackage{pgfplots} ...
2
votes
0answers
58 views

Blurred colormap using matlab2tikz to export Matlab imagesc picture

I'm using matlab2tikz to export imagesc figures into TikZ/pgfplots code. This process gives me a TikZ file and a rasterized png version of the image with colours matching the colourbar at the time of ...
4
votes
1answer
117 views

How to create a date and time plot with TikZ and pgfplots

What I want to achieve is a graph, which shows the working hours per day. Input should be the triple of date, arrival time and leaving time. The x-axis holds the dates and the y-axis shows the working ...
7
votes
1answer
87 views

pgfplots - disable smoothness

I am using following pgfplots to draw a simple function: \begin{center} \begin{tikzpicture} \begin{axis}[ domain=-4:4, xscale=2.25,yscale=1.125, xmin=-4, xmax=4, ymin=-2, ymax=2, ...