{pgfplotstable} is a package that can read, parse, modify or generate tables. Data is provided via either external files or inline code. It also serves as the data handler of the graphics package {pgfplots}.

learn more… | top users | synonyms

5
votes
0answers
63 views

pgfplotstable longtabu repeating header and other options

I want to print a long table with pgfplotstable and long tabu. For some reason, with the following code, I do not get the header repeated on every page. I also want a \bottomrule and a caption on ...
1
vote
0answers
13 views

Current file relative paths and pgfplotstableread

For my latex documents I employ a structure like this: pictures doc1 doc2 ... To allow quick editing my picture folder contains a testfile. While I successfully use the import package to allow my ...
6
votes
1answer
99 views

Getting certain data out of .txt file

I'd like to use an external .txt file to provide a table in my LaTeX document with data. To achieve this I've taken into consideration the pgfplotstable package and the filecontents package. Both of ...
0
votes
0answers
16 views

pgfplotstable use cyclelist to color columns/header

Jake shows a beautiful example of presenting the same data in a table and a plot in this answer. However he manually sets the color for the bar graph(s) and the first table fields. I am wondering if ...
3
votes
1answer
55 views

Tikz pgf plot: cyclic shift of alphabetic labels on x axis

I have the following code to produce a plot \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotstableread[row sep=\\,col sep=&]{ letter & freq \\ a & 11 \...
3
votes
1answer
105 views

! Missing # inserted in alignment preamble

I have a problem in compiling my tex file using nle.cls document class. The problem seems to be with package pgfplotstable. If I comment it our every thing works fine. The package disrupts the working ...
2
votes
1answer
52 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
67 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 \begin{...
6
votes
2answers
151 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
89 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 ...
4
votes
1answer
111 views

pgfplotstable: how to change the color/font/background of a single cell?

Let's look at this MWE, where I am trying to change the formatting/background of a cell in the table. I think I have just copied the example in the manual, but I have the nasty effect that the content ...
3
votes
1answer
130 views

pgfplotstable: read and manipulate multiple data files into one tabular

When trying to typeset a datatable I can't insert \pgfplotstabletypeset in a tabular environment. What am I missing? mwe: \documentclass[a4paper]{article} ...
1
vote
0answers
36 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) \...
6
votes
1answer
94 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 ...
0
votes
0answers
81 views

How to import data file in pgfplots? How to enlarge Tex Memory?

\documentclass[paper=a4, fontsize=11pt]{article} %\usepackage{tikzpicture} \usepackage{pgfplots} \usepackage{tikz} \newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Horizontal rule \title{ ...
13
votes
2answers
393 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 ...
1
vote
1answer
48 views

Some issues with a stacked area plot - pgfplot

I have three issues with a stacked area plot. 1: I want to make the plot more width to fit it in my presentation. But if I scale in x-direction it also scales the fonts (labels). How to avoid that? ...
1
vote
1answer
43 views

How to parse and print the characters {} with pgf and \thisrow?

I have a data table with "{}" I would like to keep these characters. Results: I would like to uningore this character from parsing to be printed on the image. I know that I could to change: nodes ...
2
votes
1answer
102 views

How to modify the layout of a longtable using pgfplotstable

In order to prepare a long series of industrial reports containing complicated long tables, I am combining samples of code I have found on the site, and this looks promising. In my field, cells need ...
0
votes
1answer
20 views

multicolumn doesn't count columns property in pgfplotstable

Consider the following MWE where I would expect the multicolumn to span the number of columns in the pgfplotstable/longtable combination. \multicolumn{\pgfplotstablecols}{r}{{\small\tablename\ \...
1
vote
1answer
75 views

Reading xticklabels from a csv

I need to display the labels in AgentTypesS column in my barchart. This is an excerpt from my .csv file (Yes, it is an uneven file) AgentTypesL, OriginalL, MergedL, DifferenceL, AgentTypesS,...
0
votes
2answers
54 views

pgfplotstable and longtable table counter problem/caption positioning [duplicate]

Consider the following MWE which uses pgfplotstable and longtable to output some csv file content. The table counter are incrementet twice for each table added. Why? \begin{filecontents*}{mytable.csv}...
1
vote
1answer
32 views

Is possible automatic refresh filecontents* at each compilation of pgfplotstable?

Recently I observe, that at compiling of some tyble set width pgfplotstable generate .csv file, which is not changed at later changes in its source (in document preamble) compilation. Consequently I ...
3
votes
1answer
104 views

pfgplotstable and siunitx, unit column from .csv file

I have some data in a .csv file that I would like to typeset with a combination of pgfplotstable and siunitx. Consider the following (not so extremely minimal) MWE who throws the error Undefined ...
3
votes
1answer
67 views

How to have unconnected points on a plot? [duplicate]

I'm trying to create a graph which has all of the datapoints from an inline table plotted, without a line connecting them, but still having the points on the graph. The issue with the MWE is the line ...
2
votes
1answer
159 views

Customizing first column for each row in pgfplotstable

I have a confusion matrix where the first column (or in this case the second column) has the same labels as the first row (or in this case the second row). The problem I have is that these labels are ...
2
votes
1answer
81 views

Why the `.tex` file is running indefinitely in PdfLaTeX?

I am using the following code to plot a set of graphs from the experimental data given in book1.txt. This .txt file is also kept in the same folder along with .tex. My book1.txt file is A B ...
1
vote
2answers
176 views

How to plot graphs in tikz using large number of data points?

I have my experimental data in a tabular form in word document format. I want to plot the data points using tikz. How to export the data points from data.doc to tikz plot? These are the data points. I ...
2
votes
1answer
67 views

Place multiple external images in a PGFPlots axis from a PGFPlotsTable

I am trying to create an environment in which I can place several georeferenced images into a PGFPlots axis. I have working code that reads in the specified image, reads in the world file (a text ...
3
votes
1answer
84 views

How to approach the drawing of this sort of scatter plot?

I'm trying to plot a data set that contains the results of some benchmarks across a number of tools on a set of input files. The problem is that there are more than 3000 test cases and I need to ...
3
votes
1answer
55 views

Several files input in one pgfplotstable

How can I get from this dataA.dat a b c 1 2 3 4 5 6 7 8 9 and this dataB.dat A B C 1.1 2.1 3.1 4.1 5.1 6.1 7.1 8.1 9.1 (as shown in the MWE) to this: a b c 1 2 3 4 5 ...
3
votes
1answer
181 views

table transpose

Trying to transpose the table like in my MWE. The result is quit nice, but contains first extra row, I'd like to exclude it. Read pgf manual, used skip rows between index={}{}, but without effect. ...
2
votes
0answers
57 views

Filter rows and create separate (sub)tables using pgfplotstable

I have following CSV file: Type Desc A B A Site-A 1 2 A Site-A 2 3 A Site-B 1 2 A Site-C 2 3 B Site-A 1 2 B Site-A 2 3 B Site-B 1 ...
2
votes
0answers
69 views

How to wrap header in pgfplotstable environment

I am using pgfplotstable to import .csv file to LaTeX. I successfully wrapped column texts using p{width} command in each column type which also prevented me from centering the columns and which didn'...
0
votes
0answers
37 views

Regression on a portion of the graph with columns

Based on the MWE of this question, I want to apply the regression only to a portion of the graph as in this other question, but not just the last portion. I want to do regression on the beginning so ...
2
votes
1answer
57 views

Shuffling table rows using PGF

Does anyone know how to get table with rows randomly shuffled (using \pgfplotstabletypeset from .dat-type file)? My current code is \documentclass{article} \usepackage{filecontents,pgfplotstable} \...
1
vote
0answers
100 views

Pgfplotstable: Filter specific rows when reading from file

So far I have a file from which I read data to the macro \data (in the MWE I replaced the file with an in code table). From this table only 3 rows are selected and printed. What I would like to ...
2
votes
2answers
242 views

Making row bold and keeping other formatting in pgfplotstable

I have a table where the last row needs to be bold. Currently, I can make it bold by following this question. However, when I make it bold, I lose all my number formatting. Here are the 2 images: ...
8
votes
2answers
72 views

Applying and doing math on two functions read from a file using pgf

I'm trying to read two functions of x from a file, and then get the result of f(8) / g(8) using pgfmathparse. Here is a minimal (not) working example: \begin{filecontents}{data.dat} f(x) g(x) x ...
3
votes
1answer
63 views

Plot hex numbers in pgfplot

I want to draw a graph from external text file which contains hex numbers (representing integers) like 0x8210 in 4 columns. It seems pgfplot does not automatically recognize the hex numbers. I know ...
5
votes
1answer
177 views

Linear regression - trend line with pgfplots 2

Happy new year. I have fitted a trend line of a population-year data with pgfplots. But I get wrong values of slope m and intercept b. By LibreOffice Calc, I got the values: f(x) = 4,478.87 x – 8,966,...
4
votes
2answers
193 views

How to plot multiple 2d filled graphs in 3d with TikZ? [duplicate]

I am trying to plot four 2d plots in a 3d box. I want these plots to be filled with respect to zero. That is, if the line is above zero, I want it to be filled from the line until zero. If the line ...
4
votes
1answer
39 views

Errors with lualatex, siunitx and pgfplotstable replacing emdash

I'm referring to this answer from @Jake to replace the string --- of an input csv to \textemdash in a pgfplotstable table with the S column of siunitx. The provided solution works fine when pdflatex ...
6
votes
1answer
352 views

colour each x co-ordinate with a different colour in a bar plot in pgfplot

I want to cycle colours for each x co-ordinate in a bar plot. Is it possible? For instance, in this example I want each metric to appear in a different colour. This question Colors and legend in ...
2
votes
1answer
61 views

pgfplot - groupplot print x label only once in the last row

In the below group plot, the xvalues are common for all the subplots. I want the x labels to be displayed only on the last row of the group plots. \documentclass{article} \usepackage{tikz} \...
4
votes
1answer
66 views

Cannot import data from csv file with pgfplots

I need to import some data from a csv file, but I get Package pgfplots Error: Table 'Data1.csv' appears to have too many columns in. Other posts related to this are not helpful. My code is here: \...
1
vote
1answer
39 views

pgfplots line cap fragments

On one specific set of data I get really strange fragments plotted in a 3D axis. The undesired fragments are "star-like" strokes, as can be seen in: A mwe is: \documentclass{standalone} \...
2
votes
3answers
69 views

How to remove quotes from data for pgfplots

I have a lot of .csv files that I need to plot. However, the numeric data comes, sometimes, among quotes or just as numbers (without the quotes). For example a,b,c,d "1","4","5","1" "2","3","1","5" "...
1
vote
0answers
39 views

Insert an \hline once, after the nth row in pgfplotstable

In the pgfplotstable documents, there is an example where you can input \hlines in every couple rows: \pgfplotstabletypeset[ every nth row={3}{before row=\hline}, % insert hline every 3 rows ...
1
vote
0answers
70 views

Highlight extreme values and show dashes for empty values in pgfplotstable

I am using @jake's solution to highlight extreme values with pgfplotstable. doc.tex \documentclass[]{article} \input{table.tex} % table.tex includes Jake's code \begin{document} \begin{table}[ht] ...