{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
303 views

Unable to read in text labels for pgfplots bar chart

I've started using pgfplots and can plot scatter plots where all data is numeric, but I'm having no luck at all with bar charts where the xlabel is text. I've tried to find a solution in the manual ...
3
votes
1answer
407 views

Pgfplots not plotting bar graph with all symbolic coordinates?

I am trying to create a bar graph using pgfplots. Specifically, I have 8 different bins of varying signal length against some computational time. I have set the x axis signal lengths to symbolic ...
3
votes
1answer
143 views

Place several plots on one page

I have 4 plots that should be placed on the same page. Does anyone know how to do it? I need to have a caption/title under each plot (and I cannot place it above the plot as there are numbers), a ...
3
votes
1answer
267 views

\newcommand Tikz argument problem

I have this two commands to read x from y or y from x on a plot. The problem is that the label is 180:#3 with above position instread of #3 east position. The wish (less important) : how to merge ...
3
votes
1answer
593 views

pgfplots: how to load distinct symbolic ticks/labels from file?

I want to plot a matrix of color-values from a csv file. Inspired by this website, I set out to write my MWE below, to which I added this way of dynamically loading symbolic ticks/labels from my data ...
3
votes
1answer
185 views

pgfplots: `nan` in `meta expr` causes “Missing number” error

I want to draw a table/matrix of color-values, where some of the values are missing. Despite having tried using unbounded coords=jump (see this answer), I get the following error: ! Missing number, ...
3
votes
1answer
155 views

Markers (xtick) in PGFplots with higher precision

Graphic The following MWE shows a figure with all identical axis markers (because the scale is too narrow). The option xtick has not "high enough precision". MWE Code I did not find a suiting ...
3
votes
1answer
134 views

Groupplots become misaligned with axis equal image

I have several images I want to align in a groupplot environment. All of the images have the same width, whereas the images fall into two categories when it comes to height, one with "small height" ...
3
votes
1answer
221 views

Marking (multiple) intersection points sinus function and constant function

The intersection of a sinus and a constant function, has multiple results. So my question is how to mark these points. My code \documentclass[11pt,a4paper]{article} \usepackage{geometry} ...
3
votes
1answer
940 views

Collapse range in x-axis with pgfplots? (break x-axis)

I want to plot data from a table file. The data has quite big gaps in the x-axis, making the actual data barely readable. Is it possible to tell pgfplots to kind of collapse the x-axis in a given ...
3
votes
1answer
172 views

Pgfplots label not appearing

\documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{tkz-euclide} \begin{document} \begin{tikzpicture} \begin{axis}[ticks=none, xtick={-10,-9,...,10}, ...
3
votes
1answer
277 views

addplot data frame

Square one: I have about 8 hours of experience. I want to make a barplot in pgfplots and see many great, creative solutions on this blog. All I want at this stage is not to specify coordinates and not ...
3
votes
1answer
304 views

pgfplotsforeachungrouped in groupplot

I want to create a grid of plots with groupplots, where every plot is taken from an external file and included via pgfplots. Due to the fact, that foreach doesn't work nicely in a axis environment, ...
3
votes
1answer
173 views

Gnuplot invisible

I'm trying to plot two implicit curves (using pgfplots and raw gnuplot) but they don't appear in the document. In gnuplot it works just fine so I guess it has something to do with pgfplots but i can't ...
3
votes
1answer
508 views

curious xticklabel style error

I'm receiving the strangest error when trying to plot a simple graph. Let me show you - this works: \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{pgfplots} ...
3
votes
1answer
980 views

Modify the legend-style in pgfplots

I have a question concerning pgfplots. I made a minimal example which is related to the example in the pgfplots manual (page 182): \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} ...
3
votes
1answer
323 views

Omit overlapping xtick labels

So right now I have something like this: As you can see, the xticks on the second (smaller) plot are a complete mess. Is it possible to just show 3 values (the first, midpoint and last ones)? ...
3
votes
1answer
236 views

pgfplots memory overload

I want to plot 5x9000+ data points. I am already using: \usepgfplotslibrary{external} \tikzexternalize and -shell-escape -enable-write18 in PDFLatex. However, I still get the memory error. I ...
3
votes
1answer
544 views

How to use `ybar interval` without skipping the last value

I have the following code \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{filecontents} \begin{filecontents}{testdata.dat} -3.316988309367815e-07 ...
3
votes
1answer
619 views

Addplot3 with graphics / Image Offset to Axis

I'm currently working with tikz and pgfplots to set a few plots. It works marvelously for a lot of applications, add I have set a number of plots (especially surfaces from matlab) with help of the ...
3
votes
1answer
1k views

Undefined control sequence \text when importing Matlab figures

I'm following a tutorial to import Matlab figures through tikz, however after trying to compile the .tex file I get the following error: ABD: EveryShipout initializing macros (./mysphere.tikz ! ...
3
votes
1answer
542 views

Adding extra ticks inside the axis environment

I am wondering if it is possible to add extra ticks to a plot without declaring them in the options of \begin{axis}. Consider the following example, where I would like to have the coordinates of the ...
3
votes
1answer
936 views

pgfplots grouped bar chart from file

I am trying to create a grouped bar chart with pgfplots from a file that contains a data table. However in the resulting picture the bars are not grouped but on top of each other. Every working ...
3
votes
1answer
130 views

Force re-reading a data file

I have a data file from which I want to plot odd/even rows seperately, in the same axis. But the table options seem to apply only once, when reading in the data, which only happens once per axis (i.e. ...
3
votes
1answer
686 views

get max/min value in a table column with pgfplot

I'd like to get the max/min value from a specific column table via function \findmax and \findmin in order to use it in ymin and ymax. I really dont get how \pgfplotstablesort function works. What ...
3
votes
1answer
209 views

Pgfplots: How to make the plot exceed the axes

I am plotting a spike using pgfplots. I want to make the y-axis until (4) only. However I want the plot of the spike itself to continue beyond the y-axis (say until 10). Is there a possible way to do ...
3
votes
1answer
325 views

How to plot data from multiple filters using pgfplots

I'm searching for a way to apply multiple filters to a data input and plot the result of each filter in one axis environment. I found the following question which applies one filter but uses the ...
3
votes
1answer
233 views

Problem with snake ticks in pgfplots for bell shaped normal distribution

I want to draw two sided created region for normal distribution (see figure below). I have issue with snake ticks proper alignment and area looks suspicious to me. Am I missing something here? Any ...
3
votes
1answer
590 views

Spacing bar between bars is too high in a bar plot with error bars [closed]

\documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ title = {ring enrich.}, ybar, width=10cm, xtick={1,2}, xticklabels={% before, after, }] ...
3
votes
1answer
521 views

Histogram fill with logarithmic scale

I face a "filling" problem when I run one of the pgfplots example but with y-log scale. Here is the MWE \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
455 views

Problem with x filter when trying to filter points according to x value

I am trying to filter points according to its x values. The data may be from a table-formatted text file, or directly typed in coordinates{...}. I tried to use x filter/.code, but for data from text ...
3
votes
1answer
314 views

Bringing the parts of a bar chart closer

In the MWE below: \documentclass{report} \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage[T1]{fontenc} \usepackage{tikz,pgf} \usepackage{pgfplots} \usepackage{slashbox} ...
3
votes
1answer
304 views

pgfplots discarding xtick coordinates

I'm creating a several graphs with pgfplots. The problem I'm coming across is that some graphs do not have a value for the last coordinate as per the example below (and I want to keep the ticks on ...
3
votes
1answer
2k views

Rescaling the colors in a colormap and the axes

I have cerated a file (workfile.dat) at the following format: <x1> >y1> <z> <x1> >y2> <z> <x1> >y3> <z> <x2> >y1> <z> ...
3
votes
1answer
832 views

pgfplots: shadow for markers

I was wondering if it's possible to add shadows to markers within pgfplots. I tried the circular drop shadow option (from TikZ) which unfortunately had no effect at all. I also read that one can ...
3
votes
1answer
402 views

Strange behavior y label in PGFplots

I've noted a strange behavior of PGFplots y label with the following code: \documentclass{report} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ compat = 1.3, no markers, ...
3
votes
1answer
30 views

How to show the mean or average value on a box plot with pgfplots

I have made the following graph: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \usepgfplotslibrary{statistics} \begin{document} \begin{tikzpicture} \begin{axis} ...
3
votes
2answers
35 views

tabular doesn't give two equally-size figures

I have produced two boxplots. Amplification.tex: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \usepgfplotslibrary{statistics} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
38 views

TeXstudio - get output of pgf externalize in log Window

I like the functionality of TeXstudio to show me errors concerning my latex-code in the Log-window. If I use pgfplots and externalize all externalized pictures are compiled in a separate call. So I ...
3
votes
1answer
28 views

Number format for a node

In the following minimum working example, how do I change number format that is used for the node? For instance, cut off the number after 5 digits. \documentclass{standalone} \usepackage{currfile} ...
3
votes
1answer
35 views

Add nodes with pgfplots

I was trying to add nodes inside axis environment but nothing came out. I actually tried several ways... Any help is much appreciated. \documentclass[11 pt, a4paper]{article} ...
3
votes
1answer
28 views

pgfplots bar plot number format

I was just trying to compile some data into a bar chart using pgfplots. Things seem to work apart from the following: The annotation for the bars has low precision, i.e. only 3 decimals, it is shown ...
3
votes
1answer
56 views

Adding manually a grid to a .tikz file generated by matlab2tikz

I asked this question here Stackoverflow Now, I know of the existence of the problem with the conversion with the matlab2tikz script and the inclusion of a grid. GridProb How can I manually add a ...
3
votes
1answer
42 views

How to add one mark to one line in pdfplot

I am attempting to differentiate each line in the graph. Then I try to use marks, however it looks messy. Is there a way to make it looks more tidy? I am open to any suggestion that works. ...
3
votes
1answer
41 views

Changing global settings for makers doesn't work in pgfplots

Often I have documents where I need plots without makers. In this case I set globally a \pgfplotsset{ no markers } However if I have some special plots in the file which require (only) ...
3
votes
1answer
68 views

How to plot the maximum and the minimum

I am interested in drawing the minimum and the maximum of two variables, i.e. min(x,y) or max(x,y). The way I was going about doing it so far was to get the contour plots using gnuplot but my attempts ...
3
votes
1answer
75 views

How to integrate pgfplot inside a pre-existing tikz picture?

I'm trying to put together a pgfplot inside a pre-existing tikz picture. But somehow the axis I create with pfgplot has different units and I'm not sure how to make the two things fit. The code is: ...
3
votes
1answer
55 views

How to calculate “extra y ticks” value by function instead of giving a fixed value

The code is as follows: \documentclass[border=2pt]{standalone} \usepackage{pgfplots} \begin{document} \tikzset{ declare function={ func(\x)= \x*\x; } } \begin{tikzpicture} \def ...
3
votes
1answer
98 views

TeXStudio: Why can't pgfplots open gnuplot output anymore?

Here's the minimum not working example: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \begin{document} \begin{tikzpicture} \begin{axis}[ ...
3
votes
1answer
96 views

use absolute coordinate axis in pgfplot automatically

I want pgfplot add a grid with absolute coordinate automatically, for example, below image original pdf is 1.17x1.19in, so I want x is (0,1.17in) and y is (0,1.19in). Now I hardcode it to Nx/Ny, can ...