{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

2
votes
1answer
924 views

pgfplots spline and colorseries do not work

I want to create a plot with predefined colors and have the points connected by a spline curve. Both things do not happen. The color series is not applied (all lines are black) and a spline is not ...
2
votes
1answer
622 views

How to order barplots in aligned rows and columns?

I am making xbar plots with pgfplots. Within different age groups ("Agen interval") of men a single winner is choosen (Winner), based on some test, and on this winner two different variables are ...
2
votes
1answer
389 views

pgfplots: externalization and ifthen

I use pgfplots with externalization. When I try to include a macro that uses \ifthenelse, always the 'else' statement is being executed. When I switch off externalization, it works again. See this ...
2
votes
1answer
860 views

pgfplots hand-made legend (\label + \ref) fails with custom styles

In pgfplots, when I use a custom style to plot a line, \label the line and then \ref to this plot, I am unable to get the desired result. The desired result would be to get a little line where I am ...
2
votes
1answer
1k views

Tikz Axis bounding box does not align with other bounding boxes. What can I do?

I want to place a lot of pictures and plots in a long document. By now, I am using figure-environment with center-environment, but the tikz-axis-plots didn't align well with included eps-pictures or ...
2
votes
1answer
2k views

Drawing Vertical Arrows in Coordinate System Using Pgfplot

I have a series of data plots, an example of which is depicted below, and I would like to draw a vertical line through a particular x-coordinate on each plot, so that the head of the arrow is is ...
2
votes
1answer
3k views

usepgfplotslibrary - undefined control sequence

I have problem with following example code: %& --shell-escape --enable-write-18 \documentclass[a4paper,10pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{polski} ...
2
votes
1answer
1k views

Regarding bar chart with text as x axis labels

I have seen the previous posts regarding "bar chart with text as x axis labels". I tried to use the same code discussed in the posts and in the documentation, \begin{tikzpicture} ...
2
votes
1answer
27 views

Use single plot marker in manual “group” legend entries

I have an axis which contains several plots. These plots can be divided into two groups, of which each has a common plot marker. The plots are styled using a combined cycle list. I would then like ...
2
votes
1answer
47 views

Individual Tick style for each Tick

I would like to raise the left Tick over the x-axis so it doesn't clip into the graph. However If I add a second "Extra x ticks" definition the first definition gets overwritten. How can I achieve an ...
2
votes
1answer
40 views

Strange behavior x tick label style versus y tick label style

I've made a graph with this code: \documentclass[11pt,a4paper]{article} % use larger type; default would be 10pt \usepackage{pgfplots} \usepackage{tkz-euclide} \begin{document} ...
2
votes
1answer
62 views

How I can change values on the Y-axis

\documentclass{article} \usepackage[sc]{mathpazo} \usepackage{pgfplots,amsmath} \usepackage{tikz} \usepackage{tkz-fct,tkz-base} \usepackage{tkz-tab,tkz-euclide} \usepackage[miktex]{gnuplottex} ...
2
votes
1answer
30 views

pgfplots: minor tick num on one axis

I was just wondering if it was possible to use minor tick num on one axis only. \begin{axis}[ axis x line = bottom, axis y line = left, minor tick num=4, xlabel={$t(s)$}, xmin=0,xmax=5, ...
2
votes
1answer
44 views

pgfplots: Scaling legend font size

There are a few posts that ask and answer how to scale the legend font size. For example, pgfplots: alignment and size of math in legend Resize font in legend below \tiny However, these rely upon ...
2
votes
1answer
60 views

PGFPlots viridis colormap

I am trying to create a PGFPlots surf using the colormap viridis in a similar fashion as some examples of the PGFPlots package manual. I will get the error Package pgfkeys Error: I do not know ...
2
votes
1answer
42 views

pgfplots: minor y ticks not showing

below code does does not draw y minor ticks. I could specify them manually, but would prefer to have them drawn automatically by 'minor y tick num=1'. Also I do not understand why exactly they are not ...
2
votes
1answer
52 views

Non-uniform colormap

I am trying to use non-uniform colormap and I get this error: Package pgfplots Error: Sorry, non-uniform colormaps are only partially implemented, yet: the provided points must be multiples of the ...
2
votes
1answer
54 views

Placement of the scale tick label in pgfplots

My question on the placement of the scale tick label is related to Placement of scale tick labels in pgfplots. In contrast, I do not want to have the label placed behind the x-axis, but behind the ...
2
votes
1answer
53 views

Clipping markers in pgfplots - strange behaviour?

I am trying to draw my manual defined markers (several stripes) but i seem unable to crop the plot (to [-.5,.5] in both dimensions). I can't even understand the effects of pgfplots here. My (n)MWE is ...
2
votes
1answer
38 views

How can I reduce the font size of the numbers shown on the axes?

Does anyone know how can I reduce the font size of the numbers shown on the axes? Right now, the numbers on the axes look kinda messy so I would like to reduce the font size of the numbers so they ...
2
votes
1answer
45 views

Move y-axis in pgfplots

I wanted to get my plot to look like this: I would like to get some help to move the y-axis to x=0. Thanks for your help and time. Here is the code that I have so far: \documentclass{article} ...
2
votes
1answer
37 views

Pgfplots: Limit y-axis and colorbar to external graphics height

I use ParaView for the creation of plots. My example picture has a resolution of 2688x1635 pixel, so roughly an aspect ratio of 1.64. Using pgfplots I want to include the picture while preserving the ...
2
votes
1answer
37 views

Pgfplots : need to impove my plot

Here is my try, but I would like : less space between x-axis and the bottom of the bars; the title not so hight; no small tick marks under the 0 and over 70 but still some space between the arrow ...
2
votes
1answer
44 views

No Line Plotted

Minimum - not working - example: \documentclass[letterpaper]{article} \usepackage{pgfplots,tikz} \usepgfplotslibrary{dateplot} \usepackage[margin=0.5in]{geometry} \pgfplotsset{compat=1.11} ...
2
votes
1answer
41 views

PGF table plot waterfall diagram [duplicate]

The Problem I'm trying to create a diagram that is similar to this diagram generated by the matlab command waterfall(): The data for it is stored in a csv file. In this case it's 129 columns of ...
2
votes
1answer
28 views

how to set and position legend in a plot with pgfplots?

I want to put a legend in this two plot: i have this code: \begin{figure}[!ht] \resizebox{\textwidth}{!}{ \begin{tikzpicture} \begin{axis}[xmin=0, xmax=90,axis y line*=left,ymin=8.62,ymax=8.69, ...
2
votes
1answer
40 views

How to set tiny font in axis labels with pgfplots

i am doing a plot with pgfplots with data from a file. It takes the values from the file correctly but when i compile the pdf it prints the label with the same dimension of the text with which i'm ...
2
votes
1answer
65 views

Problem with pgfplots and histograms

I just played with @Jakes pgfplots binomial examples from http://tex.stackexchange.com/a/198575/4011, however the histogram seems to be shifted to the left or to the right depending on the whole plot ...
2
votes
1answer
57 views

How do I plot the asymptotes in this graph?

When i plot the graph of $(x^2+x+1)/(x+1)$, there appears to be a solid vertical line in the plot which happens to be the vertical asymptote, is there a way to make that line dotted and also include ...
2
votes
2answers
117 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 ...
2
votes
1answer
59 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
1answer
39 views

How to align subscripted annotations with axis labels in pgfplots?

This question is a follow-up to my earlier question about how to align annotations with axis labels in pgfplots. The accepted solution works perfectly, but I've run into a further alignment problem ...
2
votes
1answer
187 views

Undefined control sequence. \end{axis}

I am using TikZ to draw plots in LaTeX \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} %\usepackage{pgfplotstable} \pgfplotsset{compat=1.12} \begin{document} \begin{tikzpicture} ...
2
votes
1answer
38 views

add extra tick labels pgfplot

This post is building off the color area under plot in pgfplots. I was trying to add extra tick labels at 1000 and 3000 (based of the area under the curve). I am only getting the last number showing ...
2
votes
1answer
28 views

Plotting function ontop of scatter plot in pgf

I have the following code \documentclass[danish,a4paper,12pt]{article} \usepackage{tikz,pgf} \usepackage{pgfplots} \begin{document} \begin{figure}[!h] \begin{tikzpicture} \begin{axis}[ ...
2
votes
1answer
187 views

Plot the poisson function correctly [duplicate]

I was try to plot the Poisson distribution as a discrete graph and only found continuous graph examples like this: Poisson distribution with tikzpicture Formula is: &space;0" ...
2
votes
1answer
87 views

Style of axes in TikZ

I have the following two TikZ pictures (see code at bottom). How can I achieve that the style of the axes in the second picture (the function plot) is the same as in the first picture? ...
2
votes
1answer
35 views

Labels when using gaps between line and point in pgfplots

this is a follow up question to: Gap between line and point in pgfplots, like pointintervalbox in gnuplot. I would like to add a legend in the plot and maybe even on the y-axis. Unfortunatelly this ...
2
votes
1answer
84 views

Using pgfplots to create 2-D parameterized parametric plot

I am attempting to create a parametric plot, actually two parametric plots on one axis. Nothing is coming out right and I think I need help. I admit to having less than an hour of time practicing on ...
2
votes
1answer
99 views

Pgfplots: vertical bar char prints only labels at one bar

I want to create a vertical bar charts with two bars in it. At the x-axis the bars shall be labeled with A and B. The label A is printed although it is not exactly properly positioned, but the label B ...
2
votes
1answer
146 views

Symbolic Labels in pgfplots Bar Chart

In the following code, why do I have to type the x-axis labels explicitly in the axis options and not just use the labels from the coordinates data? Is there a way to just use the data from the ...
2
votes
1answer
48 views

Force scaled ticks for color bar

I have a plot with a colorbar, generated by means of the code \documentclass[margin=1cm]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
2
votes
2answers
63 views

PGFPlots: Math, commands and braces in text along path

Following my question here about how to plot a text along a path another question came up. How can I add math or commands with \command to the text along the path? This here works: ...
2
votes
1answer
65 views

PGF boxplot with annotations

I read the section about boxplots in the pgfplots manual but I cant get it to work. I need to display the median inside the boxplot above or below the line of the median. How can I add the values to ...
2
votes
1answer
48 views

How to configure callouts in pgfplots?

In this answer I found a callout in a tikz graph. \node [above, callout relative pointer={(-2,1)},rounded corners,note=green!50, opacity=.5, overlay] at (F) {\scriptsize $y=(x+1)^2$}; However I ...
2
votes
1answer
128 views

Remove 10-base x tick labels from matlab2tikz plot

I am trying to extract some plots from Matlab for XeLaTex using Matlab2Tikz. All goes well, except the plot with the loglog scale (I included a figure, see below). The left bottom plot shows a loglog ...
2
votes
1answer
89 views

draw a rectangle with 100% opacity around the title

What is the most correct way, if one exists, to draw a rectangle with 100% opacity around the title of axis? A MWE could be \begin{tikzpicture} \begin{axis}[title=put me in a rectangle, ...
2
votes
1answer
42 views

Create a diagram from cvs: treat a contraction of numbers like a single number

I’m trying to have a diagram that shows the information produced by this MWE: \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{data.csv} Jahr, Treffer 1995-2010, 4 2005, 3 ...
2
votes
1answer
111 views

How can I add minor mark ticks to every even x value?

I would like to add some minor ticks to the x axis, but not in every value (too many!). So I thought I could add every 2 units. However, minor tick length seems to be ignored here. Here is my code: ...
2
votes
2answers
94 views

How to create an grouped histogram with table annex

I am trying to code the following graph with latex. Can someone do it? (grid settings and colors are not important) the table is the following \begin{filecontents}{table.dat} T L F LF 400 ...