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

How can I get the grid done correctly?

I'm trying to put the grid in my graphic, and I'm getting this problem below. The grid style must be help lines, and dashed, this I know how to do, but the problem remains in put the grid correctly. ...
3
votes
1answer
131 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. ...
4
votes
1answer
595 views

pgfplots and linear regression with semilogyaxis

I would like to add a linear regression line to my plot. The MWE is: \begin{document} \pgfplotstableread{ Year ICumCDP 2008 3.73E-07 2009 3.35E-07 2010 2.01E-07 2011 3.88E-07 2012 1.36E-06 ...
5
votes
1answer
369 views

How to plot small function values in pgfplots?

I am trying to visualize two functions in pgfplots and I can't get my main message across that both end at the same point. How can I change this behaviour, preferably without additional external ...
2
votes
1answer
599 views

Need help in drawing the following Stacked Bar Graph

I want your help in drawing the following figure. I think it is called as stacked bar graph.
6
votes
1answer
110 views

How to take off the marks of a graphic made with a CSV file

I'm importing a CSV file and I want to take off the marks of the graphic,how can I do this? \documentclass{minimal} \usepackage{pgfplots} \usepgfplotslibrary{dateplot} %\usepackage{filecontents}% ...
6
votes
1answer
299 views

How to use only mathematical input in the first column with pgfplotstable

I can use a mix of text and mathematical input in the first column of a table generated with pgfplots with no problem, and also mathematical input in, e.g. the last column, as this mwe shows: ...
4
votes
1answer
241 views

Node only partially rendered near edge of plot

I'm trying to draw a relatively simple chart of a number line, and when one of the nodes is too close to the edge of the plot, it gets cut off. The code: \documentclass{article} \usepackage{natbib} ...
7
votes
2answers
7k views

PGFPlots: Logarithmic axes and scaling

I'm trying to plot some data where the X axis is logarithmic. The data runs from ~30 microseconds up to 10 milliseconds. It looks much cleaner to have the x-ticks looking like {0.1 ms, 1 ms, 10 ms} ...
5
votes
1answer
650 views

Plotting a 2D gaussian sample

Can you please help me with making a 2D Guassian sample with specified means and variances? I only know how to make a guassian curve :D \documentclass{article} \usepackage{paralist,pst-func, ...
2
votes
1answer
398 views

PGFPlots slow down compilation when plotting from external files

I am writing a report containing multiple plots of spectroscopic data by way of PGFplots which is fetching data from external files. It used to do the work, and after a few minutes of compilation it ...
8
votes
1answer
1k views

Why does pgfplots plot functions only until x = 5 and y = 5?

Why does pgfplots plot functions only until x = 5 and y = 5, but not any further? \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} %%%< \usepackage[active,tightpage]{preview} ...
10
votes
1answer
863 views

Contour partially hidden by a surface in pgfplots

Thank's to SE (and particularly these two questions: Draw a bivariate normal distribution in TikZ and How to fix a contour plot at top of a 3D box), I've been able to draw what I was looking for with ...
5
votes
1answer
225 views

Plot the \coordindex in alphabetic order

I need to replace the index numbers in the plot by alphabetic sequence. For example, on the following graph instead of 0,1,2,..., I want to see a,b,c,... \documentclass{standalone} % This file is an ...
6
votes
1answer
4k views

How to remove the frame of a plot in tikz but keep the axes?

I want to have a plot in tikz, with the horizantal an vertical directed axes, without numbering and without frame. Right now my code is as follows: \documentclass{article} ...
5
votes
1answer
935 views

Bar charts: Change the vertical order of different plots and corresponding legend entries

I want to compare percentages of two different years using horizontal bar charts. The values for the 2 years (1996 and 2011) are given via a pgfplots table. I want the 1996 values to be shown in top ...
5
votes
1answer
386 views

Disappearing plot (All values has been filtered away)

I am trying to get the following plot to work \documentclass[a4paper,10pt]{standalone} \usepackage{pgfplots,tikz} \pgfplotsset{compat=1.6} \begin{document} \begin{tikzpicture} \begin{semilogyaxis}[% ...
3
votes
1answer
725 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 ...
5
votes
2answers
730 views

TikZ Function Number Too Big

I want to draw two beta distributions comparing a prior and posterior distribution but it seems that the coefficients are too large for LaTeX? How do I fix it without changing the function? It has a ...
12
votes
5answers
1k views

Create image from statistical data automatically

I am looking for a way to automatically create images like the one below: There is no MWE because all I have, for now, is this image (created, I believe, by SPSS, but I have nothing to do with that ...
3
votes
1answer
213 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
154 views

How to fill a rectangle with two corners on the function

I would like to be able to apply the same thing in the following figure for any function: Right now my code is like this(which is an edited version of some post here in Tex.sx): Wich only fills ...
4
votes
2answers
784 views

How to align two plots horizontally

I want to align these two plots horizontally: \begin{tikzpicture} \begin{axis}[ xmin=1995, xmax=2010, ymode=log, xtick={1975,1980,...,2015}, ...
5
votes
1answer
552 views

How to autoscale a horizontal barchart (pgfplots)

I need to export statistics from a database into PDF files, with a program. The database contains several tests and they need to be displayed as barcharts. Here is an example: The problem is clear: ...
4
votes
1answer
216 views

Plotting the frequency bandwidth

I do not have almost any experience with pgfplot and I am having some problems with something which seemed really easy. What I want to do is filling the area between a function and two vertical ...
10
votes
1answer
263 views

How to avoid connecting discontinuities in graphs when plotting data?

I would like to plot a graph that has a discontinuity in the sense that it jumps from 180 degree to -180 degree at one point. Unfortunately, the points at 180 and -180 get connected. See the figures ...
2
votes
0answers
184 views

Stacked bargraph nodes near coords too bunched up vertically tikz [duplicate]

How do I center the coordinates in their bars vertically? This shows horizontally in ybar \documentclass[tikz,border=12pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} ...
4
votes
1answer
446 views

line legend for mesh plots

I am doing a group plot of related curves. Since they are related by a parameter, I want to color them according to (a function of) that parameter. For that purpose, I used the mesh option, and then ...
2
votes
1answer
600 views

Change axis number format for external tikz file

I'm using \input{filename.tikz} to include .tikz graphs created by matlab2tikz in my LaTeX document. As shown in a comment on this question it is possible to change the plot marker size when the ...
4
votes
1answer
483 views

Grid lines in top-view surface plot

I'm almost satisfied with my graphs, only grid lines are missing. What I'm basically doing is a sort of density plot / color plot by letting pgfplots generate a surface and viewing it from the top: ...
5
votes
1answer
535 views

Scale markers in external Tikz file

I use external .tikz files to include graphics in my LaTeX document. These .tikz files are generated by matlab2tikz. The scatter plots that come out though have very small markers. I want to scale ...
5
votes
1answer
1k views

pgfplots - how to create a horizontal line plot in a bar chart with symbolic x axis labels

I was wondering if there was a way to get the line plots "Unseamed" and "Requirement" to span the whole width of the graph not just from the centre points of the first and last x axis labels. Is there ...
1
vote
1answer
203 views

Bad horizontal alignment in pgfplots figure

If I try to horizontally align two nodes by giving the same y-coordinate, the text $D_{\textrm{X-ray}}$ and $D_{\textrm{C-ion}}$ is still not aligned properly, which has apparently to do with the ...
0
votes
1answer
474 views

Plotting from MATLAB with matfig2pgf: some plots do not show up in the pdf

I am ploting from Matlab with matfig2pgf. I plot two lines put only part of them show up in the .pdf, once it's compiled: dat1= [-500:1000, rand(1501,1}] dat2= [-500:1000, cos(rand(1501,1})] ...
12
votes
2answers
492 views

How can I do an affine coordinate transformation in pgfplots?

It is possible to perform a general affine coordinate transformation in TikZ by combining the shift, x, and y keys (or just the generalized cm key to set the coordinate matrix and shift). This allows ...
3
votes
1answer
361 views

Wrong plot alignment when using colorbar and groupplot

The alignment of the plot is wrong when I use colorbar, see figure. How can I fix this? Further I would like to know how I can make the small axis ticks black in stead of gray? Now you can't really ...
7
votes
1answer
322 views

using more than 2 arguments in a pgfplots style

Based on How to plot data from multiple filters using pgfplots I got a follow up one. I would like to filter not only for one value of P for each plot but for also for X values that are smaller than a ...
1
vote
0answers
456 views

Undefined control sequence. \pgfplots@already@computed@legend@node [closed]

I got following error in my computer only. Undefined control sequence. \pgfplots@already@computed@legend@node ..._{\text ...
3
votes
1answer
357 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 ...
4
votes
1answer
161 views

How can I setup my data so I can create pgfplots boxplots and update the x-indices for multiple series?

I have been using this box plot code to great effect recently. I am making a large amount of plots in my thesis and would like to be able to do the following data format: ...
4
votes
1answer
3k views

How to single label a point in pgfplots with text?

This seems like it should be straightforward but I'm new to using pgfplots. I have been using this awesome box plot code and would like to be able to add a single point How can I make: ...
5
votes
1answer
915 views

pgfplots: Points with no marks but errorbars?

How can I plot data points with pgfplots that have no marks, but error bars? If I try marks=none and enable errobars, I get big filled circles with errobars. If I change my mark to mark=+, for ...
6
votes
2answers
531 views

Rindler coordinate chart (family of parametric curves) in TikZ

Is it possible to make a plot like this with TikZ or other drawing packages? This plot visualizes a two parameter family of curves, given by T = x Sinh(t) X = x Cosh(t) The pink curves are ...
3
votes
2answers
625 views

Plotting floating point data with pgfplots

Is there a binary file structure supported by pgfplots to allow floating point numbers to be loaded and plotted? I understand the time taken to convert floating point data to a text file is small, ...
1
vote
0answers
147 views

Import external eps into pgfplot [closed]

I have some flow image files in .eps format which I would like to import in pgfplots. What is the practical way to do so?
6
votes
1answer
2k views

How to draw on axis from pgfplots?

How can I draw on an axis from pgfplots? I already found out, that I somehow have to use axis cs: in front of the coordinates (what does cs mean?), but the following example does not draw the ellipse: ...
15
votes
1answer
1k views

Tikz: intersection of line and plane

I am struggling with drawing a plane and a intersecting line. I would like to have the line C,P',P in the image, disappear if it is "behind" the plane and have it reappear if it is not behind the ...
7
votes
1answer
601 views

Resizing pgf plots in an A0 beamer poster

I am creating a A0 scientific poster with the beamerposter package and I want to include TikZ/PGF plots. However, if I typeset these plots, the line width for the axis and for the data are too small. ...
6
votes
1answer
413 views

Why does \addplot shift my graph of a \pgfmathdeclarefunction function to the right?

When plotting a \pgfmathdeclarefunctioned function the graph gets an offset to the right that is proportional to the number of times the function is called in the formula. I have boiled my initial ...
4
votes
1answer
827 views

PGFplots axis scale and value manipulation

I'm a tikz-pgf beginner and try to do two simple things: i have x-values between 2^20 and 2^30 (the size, always a power of two). How can i modify the xticks respectivly (not having a power of ...