{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

8
votes
2answers
147 views

How to do linear regression in pgfplots for data with nan?

I am trying to use pgfplots to plot a linear regression to my data. If there is a nan in my data set, no fit is generated, with the warning: NOTE: coordinate (1,nan) has been dropped because it is ...
8
votes
2answers
136 views

The index of head row doesn't begin with 1

This seems a very simple question, but I cannot find an answer. I have a very simple CSV file and I want to make a LaTeX table from it. tiny.csv -1, 1, -1, 1 2, 4, 6, 8 3, 9, 27, 81 LaTeX file ...
8
votes
1answer
948 views

Import files with pgfplotstable and split tables across multiple pages

I am using pgfplotstable to import files with many rows and columns with which to create custom tables. Some tables are quite long, covering many pages. Is there a way to automatically assign the ...
6
votes
1answer
201 views

Adding units to pgfplotstable header

I am plotting a table using a semicolon separated .csv file and pgfplotstable. The table shows up fine, but i need to have units within the head of the table. like this: what I have looks like ...
6
votes
1answer
440 views

pgfplotstable: Conditional post-processing of cell content on a per-column basis

I am trying to add an asterisk to the content of certain cells depending on the cell's content (essentially, adding a marker for significant p-values) but I am having trouble trying to do so on a ...
4
votes
1answer
415 views

pgfplots and linear regression with semilogyaxis

I would like to add a linear regression line to my plot. The MWE is: \begin{document} \pgfplotstableread{ Year ICumCDP 2008 3.73E-07 2009 3.35E-07 2010 2.01E-07 2011 3.88E-07 2012 1.36E-06 ...
10
votes
1answer
995 views

How can I filter/select data (float, text) from a table and plot it?

Note I post this question in addition to a recent question (see below) with a more detailed description of the problem: This was the original question: How can I filter/select data from a table and ...
7
votes
1answer
998 views

Usage of longtable (or equivalent) and pgfplotstabletypeset

I'm a new user of TikZ pgfplots and pgfplotstable and have been stoked to discover how easy it is to go between Matlab (via matlab2tikz and writing to CSV) and LaTeX. I'm getting a little more ...
6
votes
2answers
167 views

Pgfplotstable for journals

a) Most journal have old LaTeX distribution or do not want to bother with “complicated” packages such as those derived from pgf (see Using TikZ in journal articles). I have build a table using ...
6
votes
1answer
221 views

pgfplotstable: Two columns into one with numeric data, but can't round

Question: Relates to the question posed here. I have made one column from two, but I would like to round the numbers off from a precision of 4 to 2. How do I do that? Here is the MWE: ...
6
votes
1answer
318 views

Dec sep align & string type cell incompatibility?

I would like to use the dec sep align feature of pgfplotstable while having certain cells containing text. I tried this: \documentclass{article} \usepackage{pgfplotstable} \usepackage{booktabs} ...
5
votes
2answers
152 views

Color Management with a Family of Curves

I am struggling with following fairly simple looking problem of plotting a family of curves. \documentclass[border=1mm]{standalone} \usepackage{pgfplotstable} \pgfplotsset{compat=1.8} ...
5
votes
2answers
297 views

How to plot the graph below?

May I know how to draw the graph as shown below? below is a code I have try but with look and feel that is quite far away from the example: \begin{tikzpicture} \begin{axis}[ legend pos=north ...
5
votes
1answer
530 views

Horizontal table with pgfplotstable

How can I make table in pgfplotstable table form input file A B 1.0 20 1.1 21 1.2 22 1.3 23 1.4 24 looks like this one: I trying to use \pgfplotstabletranspose\loadedtable{input.dat} ...
5
votes
2answers
538 views

Rearrange data in pgfplotstable

I have a \pgfplotstable with data (loaded from a file) like this one: \pgfplotstableread{ s f 0.0 95.9638 0.2380665 160.565 0.511 190.435 0.705 270.435 1.0 ...
4
votes
1answer
316 views

Pgfplotstable one row in bold

Considering this MWE, I am looking to obtain bold style on a row. The highlight's style works on columns but not on row. \documentclass{standalone} \usepackage{pgfplotstable} \begin{document} ...
4
votes
1answer
676 views

Trend line with pgfplots and dateplots

Is there an easy way to avoid the following pretty straightforward error message at compile time: Could not parse input '2010-01-01' as a floating point number, sorry. The unreadable part was near ...
3
votes
2answers
214 views

change font size of particular column

How to change the font size of a particular column using pgfplotstable? I only found how to change the font size of the whole table with e.g. font=\small. edit: the column header may be changed as ...
3
votes
1answer
109 views

Splitting a row into several rows in pgfplotstable

I have data set as follows: id vala valb 1 24 75 2 56 87 In this data set, there are two value types: vala and valb. The number of types may change, it can be three, four, etc. I ...
3
votes
2answers
254 views

adding row numbers to a pgfplotstable

I've had a look at the attached answer Automatic table row numbers but I'm not sure how to apply it to pgfplotstable. I'd like to get automatic rownumbers on my table so I can apply formatting by row ...
3
votes
1answer
600 views

How to get the domain for the line of best fit w/pgfplots to be all real numbers?

Although I already worked around this problem by finding the x-intercept with the linear regression equation I calculated w/gnuplot, I'm still curious to know how pgfplots can do it without me ...
2
votes
1answer
314 views

read strings from csv file for usage as figure meta data

I got the following problem, I use pgfplots(table) to generate plots and tables in my latex document from generated data. I would like to read additional information from a metadata file. The reason ...
10
votes
1answer
197 views

Setting table width with pgfplotstable

I am using pgfplotstable to create a table for the following data: Species Moles (1) Moles (2) Moles (3) Ca++ 1.8887e-4 1.9476e-4 3.4462e-2 CaCl+ 3.7537e-5 ...
8
votes
3answers
169 views

How can CSV files be put into LaTeX without having to adjust much?

I would like to have a TeX-Snippet that takes a filename as an argument and outputs a table with toprule and bottomrule: \begin{tabular}{lrr} \toprule Fach & Dauer & Einkommen\\ ...
8
votes
2answers
202 views

What is wrong with this TeX macro

Still soldiering on with trying to learn these macros. Can someone tell me why this isn't working? The macro \mycline{n-n} is supposed to expand to \cmidrule{1-1} ... \cmidrule{n-n}, but in my code ...
8
votes
2answers
2k views

Remove rows in a \addplot table command

Is there any way to adapt Show last N rows from input datafile only in \pgfplotstabletypeset to a \addplot table command ? This doesn't work: \documentclass{article} \usepackage{pgfplots} ...
7
votes
1answer
105 views

Import a table with a specified format

Basically, I have a table (from a file) containing only numeric values. I would like to import in latex but it has to be formatted in a specific way, as illustrated by the picture. The ... should be ...
6
votes
1answer
119 views

How to align two PgfplotsTable objects with graphs?

This is a follow-up for the fantastic question and answer here. I have been struggling with this so long that I would really appreciate help. Say that I have two datasets that are related, but on ...
6
votes
1answer
157 views

How to use only mathematical input in the first column with pgfplotstable

I can use a mix of text and mathematical input in the first column of a table generated with pgfplots with no problem, and also mathematical input in, e.g. the last column, as this mwe shows: ...
5
votes
1answer
333 views

Problems with \pgfplotstableread and relative paths

I have this folder structure in my project: main.tex mystyle.sty tex mytex.tex img myimg.tex dat mydat.dat And the following files: main.tex: \documentclass{scrartcl} \usepackage{mystyle} ...
5
votes
1answer
226 views

Create Table for a Family of Curves

Following the issue Color Management with a Family of Curves I couldn't find a proper way of creating the associated table for a family of curves. I tried to create new columns with respect to the ...
4
votes
2answers
61 views

Using set list with pgfplotstable

I am trying to create a new column in a table using the set list option, but it will not expand the list when stored in a macro. I've tried \expandafter in various locations with no joy so far. ...
4
votes
1answer
139 views

TikZ: How to pass a specific table to \pgfplotstableset if used for tikzpicture

I have created the following code that appears to do what I want it to. Namely add an additional row to the table \IDA that is the average of four values. This row can then be used for a plot in ...
4
votes
1answer
108 views

pgfplotstable: Why does `postproc cell content` not work properly when used within a style?

I use pgfplotstable and want to post-format a specific column. Among other things I need to duplicate its content. My problem is that postproc cell content works fine as a direct parameter to ...
4
votes
1answer
125 views

Using #1 literally in a macro

In this post I found some working code that I am now using quite frequently: \documentclass{article} \usepackage{pgfplotstable} \begin{document} \pgfplotstableread{ num value 1 2 ...
4
votes
1answer
377 views

Multi line header for pgfplotstable

I have a dataset in csv file format that I'm loading into pgfplotstable. I can't change the format of the original csv, and being financial data it has a column of item names and two or three ...
3
votes
1answer
192 views

\pgfplotstabletypeset heatmap: logarithmic scale

I am trying to create my own rendition of this heatmap. My values range anywhere from 1 to 783764. I want to plot them as colors on a logarithmically (base10) scaled colormap. So the values' ...
3
votes
1answer
254 views

Pgfplotstable adding a growth column without column names and then offsetting it

I'm trying to create a new column in a pgfsplotstable which shows the compound growth over the preceding columns. The columns don't have names, and I want to shift the column a little to the right to ...
3
votes
1answer
340 views

column separator in header line in column with dec sep align

I'd like to have a column with vertical bar separators. When I set the number format to 'dec sep align' the vertical separators disappear. Here is a MWE: \documentclass{article} \usepackage{array} ...
3
votes
2answers
535 views

Pgfplots \closedcycle introduces unwanted slope

I'm trying to plot two graphs with the area between them filled. This works fine, except for the fact that the \closedcycle does not go down vertically, but rather at some (arbitrary?) slope, circled ...
2
votes
1answer
71 views

Repeated pgfplotstable calls causing errors

I've been working with pgplotstable for some time now and initially I was reading in data from .csv files. I'm writing a couple of packages that print tables and so I've written various \defs to ...
2
votes
0answers
265 views

using special characters in csv file imported by pgfplotstable

I'm using pgfplotstable to render CSV-files as tables in my document: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{pgfplotstable} \begin{document} ÄÖÜ! \pgfplotstabletypeset[col ...
2
votes
1answer
137 views

Formatting a custom column in pgfplotstable

Following up on my question on PGF custom columns I've successfully created a column but now I'm struggling to format it to fixed, two digit precision. This seems a little hair trigger in terms of ...
2
votes
1answer
322 views

Adding a knitr table from R into a \pgfplotstableread statement

I'm trying to get a table from R into a pgfplotstable to edit for printing. the r code is \documentclass{article} \usepackage{pgfplotstable} \begin{document} \pgfplotstableread[format=inline,row ...
2
votes
1answer
299 views

Manually add a literal column to a table loaded from a file

I would like to use pgfplotstable to typeset some numbers stored in a text file. I have used \pgfplotstableread to achieve that and it worked all right. Now I want to add a column to the said table ...
1
vote
0answers
164 views

Clash between knitr, tikzDevice and pgfplotstable

I use knitr to compile a document composed of two .Rnw. Please considered the following examples from this answer main.Rnw % !Rnw weave = knitr % !TeX program = pdfLaTeX ...
0
votes
1answer
54 views

How to encapsulate row predicates in `pgfplots`

I'm trying to encapsulate some pgfplotstable code that involves setting up a row predicate. If you are checking table values amongst the predicate code you need access to the table and the only thing ...