{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
1answer
60 views

How can I force a pgfplots graph to be in the center of the page?

using width and height I can make the graph bigger, however if it is made too big the graph will start to shift towards the right and bottem of the page, despite there being plenty of space left on ...
1
vote
1answer
59 views

Unsatisfying visualization - Tick labels touching each other

On the bottom right part of the added picture you see that the x and y tick labels are almost touching each other. Which isn't really beautiful in my opinion. Are there any good solutions of this ...
3
votes
2answers
139 views

matlab2tikz spectrogram is too big

I have produced the following spectrogram in MATLAB and I am trying to import it into a LaTeX document after using matlab2tikz. I am fully aware of the issues with maximum memory etc for typesetting, ...
4
votes
0answers
58 views

String concatenation in Tikz

How can I replace the sequence (in a pgfplots, Tikz environment) \addplot[black] table {plot3/fnxspy1.txt}; \addplot[black] table {plot3/fnxspy2.txt}; \addplot[black] table {plot3/fnxspy3.txt}; ...
0
votes
0answers
22 views

Mark and Label Angle in 3D Plot Using Pgfplots

I'm on the verge of tears here. Why is pgfplots so hard to use? This is my minimal code: \documentclass[a4paper,11pt]{article} \usepackage{pgfplots} \pgfplotsset{width=10cm,compat=1.9} ...
2
votes
1answer
68 views

Overlay vector field and contour plot with tikz and gnuplot

I've been trying to produce a plot which has a contour of the magnitude of a vector field and the same vector field plotted on top. There seems to be no problem with generating the contour, but I ...
2
votes
1answer
40 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 ...
1
vote
2answers
72 views

How can I set a legend outside subfigures?

I'm making a figure with three subfigures inside of it. I'd then like to create a legend on the top left of the figure. Currently I've created the legend in the third subfigure but it would be ideal ...
1
vote
0answers
68 views

Automatically externalizing content of a PGFplot as a PNG

I've got basically the same issue as in this question: I have a rather complicated plot made with PGFplots and I can get a very significant file size reduction by using a rasterized image (PNG) ...
1
vote
1answer
54 views

pgfplots x-axis scaling to very small size

I've got a problem here. When I use the code like its shown below, it all works fine. BUT if I'm changing the xmax parameter to a smaller value like for example xmax=0.05 there are some errors ...
5
votes
1answer
66 views

Color cycle and forget plot

I use cycle list name=exotic as coloring for my plots. I am looking for a way, either to use a number referring to a color (index from the exotic list), or a way to get the color of a labelled plot. ...
4
votes
0answers
81 views

Normalized histogram (density) in pgfplots

I have a data file containing 100 256 values ranging from 0.01 to 3, approximately. I would like to plot the density of this data set. I have the theoretical (asyptotic distribution) drawn for ...
1
vote
2answers
91 views

Package pgfkeys Error(s)

I am searching for a solution of 5 package pgfkeys errors. I think the root of the problem is the same. Preliminary I tested if the pgfplot version is the same I have installed (v1.13) and I used in ...
2
votes
1answer
46 views

How to sample a function non-uniformly?

See this example code: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.10} \begin{document} \begin{tikzpicture} \begin{axis}[ xmin=-0.1, ...
3
votes
1answer
262 views

How to draw this graph

It is first time for me using latex. I am trying to draw this figure . This is my code \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ ...
1
vote
1answer
48 views

PGFPlots external crossref updates

I’m using the PGFPlots package along with its external library for my dissertation. Overall, it's worked great and has been extremely helpful. But I've had issues when trying to update ...
3
votes
1answer
57 views

Problem filling between two plots

I wanted to be able to plot two curves will fills like this: This is the code that I have so far: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.13} ...
2
votes
1answer
48 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} ...
5
votes
1answer
58 views

Changing color in foreach loop

I am trying to plot 12 different lines with a for loop and with a gradually changing color. I came up with this simple code: \begin{figure} \begin{tikzpicture} \begin{axis}[ ylabel={Normalized ...
3
votes
2answers
118 views

Unable to plot both axes and arccos function in pgfplots

What I want to plot is 3 functions: x=0, y=0, and x=cos^{-1}(x). The plot and graph of the first two look like this: \begin{center} \begin{tikzpicture} \begin{axis}[domain = -1:1, samples = 500, ...
3
votes
1answer
106 views

Common colorbar over groupplot

I have results that I want to present in a groupplot that share a common result range. Naturally, I don't want to show multiple colorbar next to each picture next to each individual picture but one ...
2
votes
0answers
37 views

pgfplots: shade area between two table-generated curves

I have three statistical quantiles generated via \addplot table. I would like to shade the area between the highest and lowest quantiles (the mid one is the median). If I use \closedcycle, I shade ...
3
votes
1answer
64 views

Draw cells in a 3D plot with only cell center data [duplicate]

I have data that is basically 3D (x,y, and temperature), a simple top view 3D plot in pgfplots \documentclass{standalone} \usepackage{tikz,pgfplots} \begin{document} \begin{tikzpicture} ...
2
votes
1answer
42 views

Define and use column styles in pgfplotstable

Is it possible to define custom styles and use them to display columns? I have 10 columns, 3 of which are strings and the rest are floating point numbers with a series of options I've defined. I'd ...
2
votes
0answers
105 views

Smooth Contour Plots in PGFPlots

I am trying to use gnuplot within pgfplots to draw contour plots for a data file. The contour curves are unfortunately not smooth enough, and the additional limitation is the size of the data file (a ...
2
votes
0answers
30 views

Work on one figure in draft mode for PGFPlots

this is my first post in this forum, so please don't be too harsh if I do any mistake. From the post of the added link in the end of my question I got the information to use ...
2
votes
1answer
46 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 ...
1
vote
1answer
68 views

date plot in pgfplots

I have a csv file containing date as below Date,Quantity "Apr 16, 2007",383 "Apr 17, 2007",448 . . I want to plot this using pgfplots, but I am not sure how to specify the format "Apr 16, 2007". ...
3
votes
1answer
46 views

How do I remove some unwanted x ticks in PGFPlots?

I am not sure where I am doing wrong, but in the plot I should not have two 32, two 64 and two 128 on the x-axis. Here is a minimum working example; I would appreciate any assistance. ...
2
votes
0answers
58 views

How to get rid of the following error with pgfplots?

When I am running the following code with data.txt file... \documentclass{standalone} \usepackage{tikz,pgfplots} \begin{document} \pgfplotstableread{data.txt}\Rtable ...
6
votes
2answers
139 views

How to plot anomaly using two colors in a single plot with pgfplot?

I want to create a line plot using a table data included in the MWE. The thing is that, using this data, I want that the plot looks like the next figure: i.e., with different color areas for one ...
1
vote
1answer
70 views

Pgfplots line style

I don't know why, but when I type commands such as: thick, dotted, red, blue etc. it doesn't recognize the commands or it just compiles and nothing changes. For example if I type thick, it gives me ...
2
votes
1answer
38 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 ...
0
votes
1answer
69 views

How can I draw this population pyramid graph with pgfplots?

I'm using this code and it works fine: How can I draw a pretty population pyramid graph with pgfplots? But I want to draw the population pyramid like this in figure. Please guide me how to di it.
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} ...
3
votes
2answers
127 views

PGF Plots line not all thick

I have looked on the forum and haven't been able to find a solution to my problem. I have a .tikz file made in MATLAB and exported using matlab2tikz, with two plots containing a very large number of ...
2
votes
1answer
50 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 ...
3
votes
1answer
95 views

Alternate position of x tick labels

Is it possible to automatically change the position of every other x tick label in pgfplots? This is my scenario: I have a plot with symbolic x tick labels loaded from the table. Those labels are ...
5
votes
1answer
113 views

Can pgfplots display the intersection of two surfaces?

I'm trying to depict Viviani's curve with tikz. Ideally my picture would look like this one: (source) My code is \documentclass[]{standalone} \usepackage{pgfplots} \usepackage{tikz} ...
3
votes
1answer
59 views

hiding everything except graph while maintaining the bounding box

I am trying to overlay a pgfplots produced graph with other curves within an animation using the same plotting domain, but suppressing any output (axes, labels, ticks) other than the curves to be ...
4
votes
1answer
77 views

centering tikzpicture

I have some problems concerning the command \centering. I want to put a tikzpicture in the center of the page but I can't do it. I tried with \centering and with \begin{center}...\end{center} but ...
4
votes
3answers
194 views

Graphing 3 function

I wish to graph this This graph has 3 functions on it t=x-r, r<0, x<0 x=r, r>1, x>1 (x-r)/(1-r), 0 My problem is I am wishing to stop the (x-r)/(1-r) lines at the point (1,1) as seen in my ...
6
votes
2answers
243 views

How to plot Lambert W function with pgfplots

I would like to plot the two main branches of the Lambert W function with different colors using pgfplots like here but I don't know how to do it. Is there some way to reflect a function with respect ...
4
votes
1answer
113 views

How do you plot a function without a y-axis?

I'm looking to design a question where students sketch a derivative based on a drawn function without the y-axis. The y-axis is not important as we're focusing on the x-values of turning points and ...
4
votes
1answer
91 views

Fill Between Missbehaviour?

everyone! I am trying to color with intense red the triangular area between the black line and the two red lines that is currently in light red (in the right). After reading the corresponding section ...
7
votes
1answer
87 views

How can I change color of 3D surface on pgfplots?

I want to change color of 3D surface like picture(exactly). How is it possible? \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.6} \begin{document} ...
3
votes
0answers
66 views

How to exclude items from a TikZ Spy

Somewhat related to this question, I would like to exclude items from the magnified area. In the example below, I do not want the pin lines or the orange line to appear in the magnified area. Is ...
3
votes
2answers
135 views

plotting discrete signals

I would like to plot several discrete signals with pgfplots. So far, I've done the following \documentclass[border={10pt}]{standalone} \usepackage{tikz,pgfplots,filecontents,amsmath} ...
2
votes
1answer
72 views

Dual copy of tikz packages cause update problem in texlive

I recently updated texlive to 2015 (at least, my texlive mangager shows 2015). I use \pgfversion to check, and it shows 2.10. Then I use texlive manager to update pgf, it looks that it works, I should ...
1
vote
0answers
60 views

Drawing Bar charts with Std.deviation and Confd.level with PGFPlots

I want to draw a bar chart where on each bar it shows the standard deviation(and also confidence level). I tried using following solution but I get the "dimension too large" error. Basically I have ...