{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
83 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
36 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
60 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
38 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
91 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
29 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
38 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
62 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
45 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
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
122 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
42 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
90 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
94 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
56 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
78 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
120 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
116 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
72 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
80 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
78 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
29 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
31 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
72 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 ...