{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
0answers
55 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
133 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
62 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
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 ...
0
votes
1answer
63 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
121 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
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 ...
3
votes
1answer
89 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 ...
4
votes
1answer
90 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
55 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
72 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
191 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
234 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
88 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
77 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
63 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
117 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
69 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
44 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 ...
0
votes
1answer
52 views

It is possible to print the title of a plot below the x axis?

i wanted to know if it possible to have the plot's title below the x-axis instead of above. i attach the plot that i've done: and the code for the axis that i used for the graph on the left: ...
3
votes
0answers
77 views

Appropriate values for `xmin`, `xmax`, `ymin`, `ymax`, or `unit vector ratio={a b}` to get asymptote

I would like to graph a function that has y=x as an asymptote. In the following code, I have $\sqrt{x^2 + x}$ plotted. It does not look like y=x is an asymptote to it. Are there values for xmin, ...
1
vote
1answer
33 views

How do I put labels on bars in a horizontal bar chart such that they are centered within the bar?

I am aware of nodes near choords, which is sufficient if the placement of the label is supposed to be relative only to the end node of a bar. What I am trying to do, however, is to have the label ...
1
vote
3answers
112 views

How to add a text box in a plot with pgfplots?

I've done a plot with pgfplots with this code \begin{figure}[!ht] \resizebox{\textwidth}{!}{ \begin{tikzpicture} \begin{semilogyaxis}[scale only axis, xmin=-20, xmax=200, ymin=0.01, ymax=20, ...
1
vote
0answers
21 views

`string replace` before plotting

The package pgfplotstable defines a key string replace* that can be used to replace strings inside a typeset table (in \pgfplotstabletypeset); for instance (quoting from the manual) ...
0
votes
1answer
71 views

How to display the y-values of each bar in pgfplots bar chart above the bar?

I am using code from this thread. link: Making one bar in a bar-graph stand out pgfplots Everything is working fine but I want to display the y-values of each bar in pgfplots bar chart above the bar. ...
2
votes
1answer
79 views

2D correlation plot matrix with shapes

Is there a straightforward way to create a correlation plot matrix similar to the figure below? The image is an example of R's corrplot package using circles, which also offers other shapes and ...
2
votes
1answer
35 views

jump mark mid on ybar starts and ends on x tick and covers only half of the first and last bar

I have this problem on a graphic, i need to do it exactly so, but the jump mark mid starts from the tick, i would like it to cover the whole bar as it does for the others. The only solution i could ...
3
votes
2answers
42 views

pgfplot bar graph legend and y labeling

I would like to ask how to get my results. My code: \begin{tikzpicture} \begin{axis}[ybar stacked, legend style={cells={anchor=west},at={(1.75,0.89)}}, area legend, %legend ...
6
votes
1answer
77 views

pgfplots: correct rounding problems

I had a problem with disappearing marker as the data sum up to more than 100 while xmax was set to 100. See pgfplots: node near coords missing due to rounding problems. As written in the answer to ...
2
votes
1answer
123 views

Is it possible to user-define the percentages for lower/upper whisper in boxplot of PGFPlots?

According to Section 5.12.1 of the manual of PGFPlots; Revision 1.13 (2016/01/06), boxplot visualizes (see Page 472): Median is the 0.5–quantile of the input data. Lower quartile is the ...
0
votes
0answers
22 views

Bar plot, calculate the average automatically [duplicate]

I need to create many bar plots as shown below. I have two simple related questions. Can I input the data in a better way? From filecontents or otherwise? They are always grouped in 1,2,3,4 and then ...
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
2answers
54 views

Scaling the axes in `pgfplots` to plot the square root function

What is wrong with this code. I use unit vector ratio={2 1} to get a better visualization of the square root function and cube root function. \documentclass{amsart} \usepackage{amsmath} ...
0
votes
1answer
30 views

PGFPLOT bar graph possition legend and different notation

I would like to ask you about the bar graph and possition legend. \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} [ xbar, ...
3
votes
0answers
43 views

Thickness of pgfplot line makes data look jagged [duplicate]

I am using matlab2tikz to generate a plot from experimental data and have a problem with the appearance of the plot. Changing the line thickness makes the data look very jagged. This is hard to ...
4
votes
2answers
71 views

Label graphs GnuPlot and tikz

I'm trying to label some plots but I can't seem to figure it out. I am trying to get something that looks a bit like this: Found in the texanmple website here. I would like to label the function ...
12
votes
2answers
353 views

Plot one function per row of table

I want to plot a polynomial that is parametrized by an additional parameter d. I took samples of the domain of d and stored the coefficients of the polynomial for each of these samples in a table: d ...
0
votes
2answers
83 views

Horizontally align x-axis of a curve figure and a contour figure

I have two subfigures generated by Tikz, one is a curve plot and the other is a contour plot. The x-axis actually are the same so I want to align them horizontally. I gave a minimal working example ...
2
votes
1answer
73 views

Automatically align 104 subplot in pgfplots

Using Matlab2tikz I generated a file containing 104 subplots aligned in a very specific manner. I then inserted \pgfplotsset{yticklabel style={text width=2em,align=right},}, compiled and obtained the ...
1
vote
0answers
33 views

pgfplots fill between, error: missing number trated as zerro [closed]

I try to test all examples from pgfplots manual, which shows use "filling between". For this purpose I construct simple MWE like the following one: \documentclass[border=3mm]{standalone} ...
4
votes
2answers
152 views

Fill between and soft clipping doesn't work as expected

I am trying to visualize the oriented area under a curve using pgfplots like in the following example. However the output is messed up. What's wrong here and how to fix it? ...
1
vote
1answer
53 views

How to choose options for example the color globally for every fill between plot?

I want to set globally the color and other style options for every fill between plot in my document. How can I do this? I tried the following, but it doesn't work: \documentclass[tikz]{standalone} ...
0
votes
0answers
46 views

Intersection of data points from file with plane [duplicate]

I have written a simple code to stack multiple 2-dimensional plots read in from data files, in a 3-dimensional plot for comparison purposes. The minimal working example is the following: ...
4
votes
1answer
84 views

pgfplots: coordinate has been dropped because it is unbounded

After compiling the code I get: coordinate (0Y0.0e0],4Y0.0e0]) has been dropped because it is unbounded (in y). Here the solution was to specify a domain. I did it, hence I do not understand why I get ...
2
votes
1answer
92 views

How to draw a secant of parabol like this picture?

I want to draw this graph I tried with Geogebra \documentclass[12pt]{standalone} \usepackage{fouriernc} \usepackage{pgf,tikz} \usepackage{mathrsfs} \usetikzlibrary{arrows} \pagestyle{empty} ...
3
votes
1answer
179 views

Displaying a pgfplots graph above another pgfplots graph in TikZ

I have two graphical solutions to an inequality (and an algebraic solution to it). One solution is to be displayed on the number line, and the other solution is to be displayed on the Cartesian ...
1
vote
1answer
74 views

Partial polar plot with pgfplots

I want to create a polar plot only of the first quadrant of the circle (angles 0 to 90 degrees), but I can't get the ticks and labels right. Take this sample: \documentclass{standalone} ...