{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

1
vote
0answers
70 views

How do I uniformly change bar thickness, box width and add error bars?

I need help with a few adjustments on this group plot. I managed to solved my previous problem but now I´m searching for a needle in a haystack. 1. How do I make the bars thinner so they may fit ...
1
vote
0answers
121 views

draw a function in Latex

I'm a beginner to latex and tikz, I've learned some basics but I still don't have a clue to draw functions in latex or tikz. Could anyone provide me with the codes for the two functions shown in the ...
1
vote
0answers
49 views

Something like \tikzexternalize[prefix=tikztmp/] for LuaLaTeX

My aim is to compile a *.tex file that contains quite a number of tikz-environments and to create for every tikz-environment one pdf-file. Under LaTeX I would use something like ...
1
vote
0answers
131 views

Memory overload due to pgfplots / tikz

first of all, I need to mention that there are 2 related threads, that I found usefull: 1, 2. I am working with TeXstudio 2.8.8 on Win 7 64bit (i5 @3.3GHz, 8GB RAM - if this matters). My goal is to ...
1
vote
0answers
38 views

pgfplots(table) protect ##1 when in a `\newcommand` with optional arguments

I am using the excellent answer from @percusse to the question How to rotate head row cell entries of pgfplotstable which works great if you always want rotated headers. I am calling ...
1
vote
0answers
79 views

Display resource usage as a Gantt Chart-like plot in pgfplots

I'm working with a distributed system which makes opportunistic use of connected resources. I would like to display the usage of the resources over time in a Gantt Chart-like plot, where resources are ...
1
vote
0answers
45 views

Not all values shown with pgfplots dateplot

I have some data as a function of time in a csv-file. I plot it using dateplot from the pgfplots package. My Problem is shown in the figure below. In my opinion not all values of the csv file are used ...
1
vote
0answers
58 views

How to fix pgf boxplot error with only zero value in samples?

Following this previous question I am still figuring out how to properly handle different "borderline" cases with the boxplot feature provided by pgfplots. The following MWE: ...
1
vote
0answers
102 views

Combining logarithmic scale and self-defined ticks on colorbar

I'm trying to make a heat map of matrix form data, with logarithmic scale on the colorbar, I'm essentially following the advice here. But the problem I am having is that I have the ticks set on weird ...
1
vote
1answer
100 views

After setting the samples parameter, why are gnuplot plots misaligned relative to background TikZ grid?

In order to run this code, you'll need to have gnuplot installed. In addition, you'll have to have your editor/workflow ensure that the --shell-escape option is passed to pdflatex, so that TikZ can ...
1
vote
0answers
129 views

PGFPLOTs bar chart with zero data ymin=0 not respected

I have simple bar chart. With zero values in \begin{tikzpicture} \begin{axis}[ ybar, axis lines*=left, ymajorgrids, bar width=0.26cm, width=0.45\textwidth, ymin=0, y tick label ...
1
vote
0answers
153 views

standard deviation in latex graph

How can draw standard deviation in latex graph(excel command stdev) \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{caption} % <---- \captionsetup{font ...
1
vote
1answer
92 views

Trim excessive whitespace from top of 3d pgfplots graph

Using the data in this file, I have the following plot: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{savetrees} \begin{document} \begin{figure}[b] \centering ...
1
vote
0answers
99 views

How do I do a scatter with trend line? [closed]

I'm trying to remake this table from an article about Nested Containment List by Alekseyenko: I have a file with all my points in this format: 1183 0.561 1222 0.384 1473 0.425 1941 ...
1
vote
0answers
53 views

Lines plotted in front of others, though they should behind in a 3d plot

After converting a figure to TeX using matlab2tikz, I figured there's a little problem. The figure consists of many lines, but there are two different sets of lines a cloud set, forming a stream ...
1
vote
1answer
79 views

How to make this bar plot visible?

I am trying to visualize about 21 data points, each which gives a different value for 3 different tasks, so there are 63 unique values to plot. I have tried using pgfplots colored bar plot, but I ...
1
vote
0answers
89 views

How to group box plots in pgf / tikz? [closed]

Grouping bar charts is easily done using pgf / tikz, e.g., \begin{tikzpicture} \begin{axis}[ width = 0.85*\textwidth, height = 4cm, major x tick style = transparent, ...
1
vote
0answers
18 views

Beamer, booktabs, empheq, pgfplots incompatability [duplicate]

The following minimal example \documentclass{beamer} \usepackage{booktabs} \usepackage{empheq} \usepackage{pgfplots} \begin{document} \begin{frame} Test \end{frame} \end{document} gives the error ...
1
vote
1answer
95 views

Pgfplot : problem with common exponent for ticklabels [closed]

I have plotted 2 similar graphs with Tikz Pgfplot and I am not able to explain why their axes tick labels are not rendered the same way : both use exponent scientific notation (which is what I want), ...
1
vote
0answers
86 views

Pgfplotstable: column math is wrong!

I am using the following code with pgfplotstable to generate a new column that represents the difference of two other columns. \pgfplotstableset{create on use/iqr/.style={ create ...
1
vote
0answers
106 views

PGFPLOTS defintion inside macro inside table or insert boxplots inside table

I am trying to take a plot of a series of boxplots and include/insert these into a table. The code came from a posting of using a data table to define a series of boxplots. The code for the table ...
1
vote
0answers
157 views

Table of ybar plots with specific colors

I am trying to use specific coloring in an table of ybar plots. Maybe someone can help me out here. I have read other threads concerning the coloration of ybars but none of them really worked. This ...
1
vote
0answers
121 views

Formatting pgfplots bar graph with tabular* legend

When I attempt to change the size of my bar chart so that it sits centered above my legend, I can't get the height and width to simultaneously fit my specifications. One dimension is always too small. ...
1
vote
0answers
185 views

PGFplots (windows and linux) compile problem

So I am writing a report with a group where I am using Debian with texlive and my groupmates are on both Win 7 and Win 8 with miktex. I have made some plots using PGFplot on my machine, looks like ...
1
vote
0answers
39 views

matlab2tikz/pgfplots: Tick-labels in axis cannot be overwritten [duplicate]

I want to export plots from MATLAB to tikz and use matlab2tikz to do so. Most of the data I have has dates on its x-axis. In MATLAB I use serial date numbers to store the time. I override the ...
1
vote
0answers
123 views

pgfplots xbar stacked with grouping

I want to make a plot with xbar stacked style but some ylabels should be grouped together. I found this question and solution How can I mix an “ybar” and an “ybar stacked” with pgfplots?, but it is ...
1
vote
1answer
75 views

Axis labels shifts off centre when using the xscale function

I have a plot to go into a report that needs to have the horizontal width increased, whilst maintaining the original vertical height. I am currently using the an xscale=1.7, however this shifts the ...
1
vote
0answers
119 views

Unequal bin widths in pgfplots density histogram

In the pgfplots manual, it talks about density histograms with equal bin widths/ranges. Is it possible to make a density histogram with specified unequal bin widths/ranges? For example, if I set ...
1
vote
0answers
77 views

Surface plot of data does not produce expected result [closed]

I would like to make a surface plot of data.txt. I use the following code as a MWE. \documentclass{article} \usepackage{tikz,pgfplots} \pgfplotsset{compat = 1.8} \begin{document} ...
1
vote
0answers
87 views

How can I horizontally align the bars of two barplots

I would like to align the clusters of the two barplots of the figure below. For instance, I would like that the cluster of "Program-2" on the second bar appeared just below the "Program-2" cluster ...
1
vote
0answers
38 views

Fourier transform visualization in 3D [duplicate]

I want to plot this (based on this image from Wikipedia): As far I get this: \documentclass[tikz,border={20pt}]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.10} % ...
1
vote
0answers
90 views

Second iteration - Is there a way to clear paths previously defined with name path global in TikZ

In realtion to this pretty old question (back 3 years from now) Is there a way to clear paths previously defined with name path global in TikZ? I would like to know, whether there is actually a nice ...
1
vote
0answers
120 views

\draw via \pgfplotstableforeachcolumnelement fails outside {axis} environment, but works inside?

Consider this MWE: \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \usetikzlibrary{calc} \pgfplotstableread[col sep=space,row sep=newline,header=true]{ ts val 0.0 0.0 1.0 ...
1
vote
0answers
128 views

Make a large heatmap with gaps and tables between

I am trying to make a large heatmap which looks like this with gaps and row or column names written in some of the cells. Empty cells are also present in the heat map. Can i make this using pgfplots? ...
1
vote
0answers
122 views

Embedded axis Pgfplots

So I need to display data as follows: every day for a month I have a set of values obtained in different hours. I want the axis to contain the date but between a date an another I want to have the ...
1
vote
0answers
100 views

how to draw a unfinished data point bar in pgfplots?

I want to present some experiment comparisons. One of the candidate (SHJ) takes too long to run. Could anyone give me some suggestions on how to present such data point in a bar chart? Thanks in ...
1
vote
0answers
84 views

Pgfplots histogram with input data already counted

I have input data that looks like this: Age Count Cumulative Count Percent Cumulative Percent 24 1 1 1.4084507 1.4084507 25 1 2 1.4084507 2.81690141 30 2 4 ...
1
vote
0answers
70 views

Stacking scatter plots with different y-axes in pgftex [closed]

I'm trying to create a stack of scatter plots with a common x-axis but different y-axes, alternating between left and right sides. I'm just learning pgfplots and while I've read up on using multiple ...
1
vote
0answers
40 views

Plotting a signal along with its harmonics in one figure [duplicate]

I would appreciate it if someone could help me plot a figure similar to the following picture. I want to draw the fundamental signal along with a few first harmonics using pgfplots.
1
vote
0answers
136 views

pgfplots: Explicitly Setting 'Line and Mark Intersection' In Plot

Is there a way to specify where a line intersects a 'mark' on a pgfplot? MWE: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{figure}\begin{tikzpicture} ...
1
vote
0answers
203 views

PGFPLOTS: Insert a boxplot outside the chart axis labels, much like GNU R

I have some code that plots a horizontal barchart. What I would like to do is put a boxplot or confidence interval above my horizontal axis which is on top of the chart. GNU R (see R In Action, Robert ...
1
vote
0answers
162 views

“Dimension too large” error with pgfplot generated with matlab2tikz [closed]

I would like to insert a tikz plot generated with matlab2tikz in my code. This is the code to generate the matlab image X1=[7.4632 8.0349 8.5251 8.8176 9.2251 9.5559 9.9214 ...
1
vote
0answers
98 views

Why these thin lines on a PGFPlot doesn't appear on some PDF readers? [closed]

I remember reading about PDF reader issues on this StackExchange, but I cannot find the links. The following TikZ picture has some thin lines in light green that doesn't show up on some readers (e.g. ...
1
vote
0answers
150 views

Incomplete parametric curve, ''written letter e'' [closed]

I have tried plotting some parametric curves like (x^3-3*x,3*x^2-9), and it works fine. The following, however, does not work: (x-x/(1+x^2),1/(1+x^2). I have tried several ways of plotting it but the ...
1
vote
0answers
126 views

legend transparency in pgfplots

I want to have a legend in pgfplpots such that it overwrites grid lines (i.e. grid lines are erased where the legend is placed) but not the axis (i.e. axis are drawn on top of legend, in case legend ...
1
vote
0answers
45 views

Displaying two plots side by side not displaying titles correctly [duplicate]

I’m writing a report and using the following code to display a bode-diagram. To save some space (I have several of these figures), I’ve displayed them side by side, but the title of the right plots’s ...
1
vote
0answers
125 views

Create a bar char from CSV

I have a .csv file that looks like this: gender.csv GENDER,NUMBER,PERCENT MALE,20,20 FEMALE,80,80 TOTAL,100,100 I want to create a bar chart using MALE and FEMALE. GENDER can be the chart name or ...
1
vote
0answers
233 views

fillbetween causes Illegal unit of measure (pt inserted) [closed]

This works beautifully: \documentclass[12pt]{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} %\usepgfplotslibrary{fillbetween} \begin{document} \begin{tikzpicture}[ ...
1
vote
0answers
166 views

pgfplot same size font in figures and same size figures

Hi I've created figures with standalone and pgfplot package. The figures output size are different to one another but more importantly the font size are different. I would like all figures to be of ...
1
vote
0answers
95 views

Graph Labeling and Text Overlay Ability [closed]

I have a couple of question in regards to LaTeX ability to overlay text on a graph at a specific point. The background: I have a time-series plot that I load in to LaTeX using a txt file and the ...