{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
59 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
58 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} \begin{...
2
votes
1answer
66 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
99 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
52 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
61 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
66 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
59 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
41 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
50 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
61 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
39 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
45 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} \begin{...
2
votes
1answer
55 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 data,...
2
votes
1answer
43 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
42 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
74 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
72 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
156 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
130 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}% ...
2
votes
1answer
44 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
372 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
44 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}[ width=...
2
votes
1answer
213 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" target="blank">&space;...
2
votes
1answer
88 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? \documentclass{...
2
votes
1answer
37 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
106 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
128 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
187 views

pgfplots: Bar graph with confidence intervals (error)

I would like to put a confidence interval (error bars) in my bar graph, but I tried the += and -= and it did not work. Here is the code: \begin{tikzpicture} \begin{axis}[ width = 0.50*\...
2
votes
1answer
189 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
62 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} \begin{axis}[colorbar,view={...
2
votes
2answers
74 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: postaction={...
2
votes
1answer
79 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
57 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
468 views

How to correct nodes near coords position in ybar stacked?

I'm working with this ybar stacked graph, but I can't position the nodes near coords in a correct position (not over something, not outside the chart, not over other bar, not to far away...readable!). ...
2
votes
1answer
154 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
91 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
43 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 2006,...
2
votes
1answer
124 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
98 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 0....
2
votes
2answers
126 views

Placing a label in specific corner of the chart

I plot two time series with pgfplots in one chart. I have a legend in the top right corner. Now, I would like to add a label (saying "Correlation = 0.86") in the top left corner. I have tried a lot ...
2
votes
1answer
151 views

PGF labels in groupplot vs. the list of figures

For my bachelor thesis I'm relying on pgf for my plots. In the groupplot environment I create a node to label each subfigure, something like: \node at (x,y) { \textbf{a)} \addtocounter{...
2
votes
1answer
60 views

label points from table

I plot some points in pgfplots like in the following MWE: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} \begin{tikzpicture} \begin{...
2
votes
1answer
119 views

Reversing y axis in polaraxis plot

I'm trying to reverse the y axis of my polaraxis plot while keeping the zero towards east. This is supposed to produce a clockwise polar plot. However, the tick anchors are not mirrored in the ...
2
votes
1answer
559 views

Pgfplots: How do I change plot line width independently of axis line width?

I can use something like \pgfplotsset{every axis/.append style={line width=1pt}} to make all lines 1pt thick, but I would like to make only the plot lines thicker. I can do this on a per-plot-basis ...
2
votes
1answer
193 views

Two histograms with curve on top, using precomputed data (tikz)

How do I recreate something similar to the matlab figure (screenshot below)? My data is extremely numerous so I am unable to write a txt file for tikz to read in and make its own histogram. Therefore,...
2
votes
1answer
90 views

pgfplots: How to adjust the width of the drawing area?

I want to produce plots that fit into the columns of a text document. My problem is that setting width=\linewidth seems to apply on the axis and labels only. When I put the legend outside it sticks ...
2
votes
1answer
108 views

Markers of \usetikzlibrary{plotmarks} in nodes shifted compared to \addplot [duplicate]

MWE: \documentclass[]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \usetikzlibrary{plotmarks} \begin{document} \begin{tikzpicture} \begin{axis} \addplot[mark=*] coordinates {(0,0)};...
2
votes
1answer
90 views

Missing Legend Entries in GroupPlot

I am constructing a groupplot with a common legend placed in a node under the plot. An MWE that recreates my problem is below. \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{...