{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

3
votes
1answer
42 views

Adapted table width to text using pgfplotstable and csv excel

I have a problem with forcing my table to the same width as the text. I export the csv (Excel) file to Latex using this approach, see code. Changing text-size in Excel works to a curtain "level", but ...
0
votes
0answers
13 views

Load CSV file + landscape

I hope someone is able to help me. I'm trying to create landscape pages, that are holding my survey items. After several tries with CSV files, I wrote everything by hand, but it's just too inflexible, ...
1
vote
1answer
34 views

Merge two .csv files and add missing rows?

I have two files. A.csv: date,colA 2016-01-01,1 2016-01-02,4 2016-01-03,2 And B.csv: date,colB 2016-01-01,2 2016-01-03,4 I'd like to combine these to get equivalent of: date,colA,colB 2016-01-...
1
vote
1answer
19 views

Table transpose, \textnumero sign

The MWE \documentclass{article} \usepackage{booktabs} \usepackage{pgfplotstable} \usepackage{textcomp}%%% for \textnumero \begin{document} \pgfplotstableread{ N Ans 1 -36 2 33 3 -52 4 -...
4
votes
1answer
27 views

Append slopes of linear regressions to a pgfplotstable column

Suppose I have one pgfplots-axis with multiple data series. Now I loop over this and calculate a linear regression of each series. How can I store the slopes of the regression lines to a pgfplots ...
0
votes
0answers
10 views

How to create legend in loop using parameters from text file with PGFPlots?

I have parameter in a text file and I would like to create legend using those parameters. I have tried to read data with \pgfplotstableread{param.txt}{\myparams} and get specific parameter with \...
1
vote
0answers
44 views

Why pgfplots sometimes cycles markers and colors and sometimes doesn't?

Why the following examples differ considering line color and markerstyles? First one draws black lines with no markers. Same thing happens when I add plots with \addplot table [x index=0, y index=1]{...
0
votes
0answers
22 views

pgfplotstable: How to change font for the minimum/maximum value in a column?

I am trying to automatically change the font for a cell if the value is the minimum/maximum in that column. In the manual of pgfplotstable there is a post-processing step that can change the font if ...
1
vote
1answer
28 views

Changing the font family of a string type column using pgfplotstable

Suppose I'm using Beamer, pgfplotstable and the professionalfonts font theme. I'd like to use the computer modern font also in a string type column. Here is a MWE: \documentclass{beamer} \...
0
votes
1answer
30 views

Using a comment line of a table as title?

I have data sets with tables like this one: @ DATE %s 16/06/16 @ TIME %s 17-01-45 NAME POS XY.1 10 XY.2 20 XY.3 25 Plotting and reading the table in general works with \addplot[] table[...
0
votes
0answers
16 views

Log normal plot from matlab2tikz

I want to draw lognormal plot using matlab2tikx and make .tex files. I get correct plots in matlab, however, when I export the .tex files to latex, the lognormal format isn't there anymore. Can ...
3
votes
1answer
46 views

Automatic labelling of isolines based on table's column name

I would like my code to use the column name (from pgfplotstable) to automatically label the lines. Here is a MWE: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \...
4
votes
1answer
37 views

How to prevent \rowcolor from overriding row lines in PGFPlotsTable?

A relatively new to PGFPlotsTables but find it very useful for formatting large tables and pulling in external data in LaTeX. However, I'm running into the following issue. When I want to color the ...
2
votes
1answer
41 views

How I can get get Null values in table using pgfplotstable?

I am creating a table using pgfplotstable in LaTeX. But the problem is, I want first column of table blank. But we never leave any values, table should be balanced in pgfplotstable.I define "nan" to ...
1
vote
1answer
45 views

How to reference a cell outside pgfplots-table?

I have written a dynamic LaTeX table which includes data from an external file and computes a new column out of the existing columns according to some criteria. Now I want to reference the computed ...
3
votes
1answer
37 views

Rounding off before plotting

Is it possible in latex to directly round off numbers from tables before plotting? I tried using round-precision from siunitx package, but this does not seem to work. MWE \documentclass{...
1
vote
1answer
32 views

Best way to apply same style to data/theory pair-plots automatically?

Suppose I have multiple plots of experimental data series in one axis and that I also want to plot a theoretical prediction for each series. Is there any good way to group each data/theory pair ...
2
votes
1answer
30 views

pgfplotstable: conditional formatting by string value

I would like to extend the following example so that cells with YES in are colored green and cells that have NO in are colored red: \documentclass{article} \usepackage{pgfplotstable} \begin{...
5
votes
0answers
39 views

Skip some x tick labels when using `xtick=data`

I am plotting some csv data with \documentclass[border=10pt]{standalone} \usepackage{tikz} \usepackage{pgfplotstable} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \begin{document} \begin{...
4
votes
0answers
40 views

pgfplots: Plotting one subfigure per country, from datafile

I have data in csv format at the country-year level, and using pgfplots I would like to plot a given variable over time, with one subfigure per country. My idea was to use a groupplot environment: and ...
6
votes
2answers
50 views

Precision setting lost when postprocessing rows

I want to generate a formatted table from a CSV file: with every other row in a different color using 4 digits precision for numbers Right now I can't seem to have both. Here's an example code to ...
6
votes
1answer
88 views

pgfplotstableread + addplot table: scale column for re-use

I get output files from a code and I want to display the output file with pgfplots. I want to create several different plots with the same files. Therefore, I read them in a macro with pgfplotstable. ...
1
vote
0answers
24 views

pgfplotstable: trouble reading data from file with leading zero

when i create a table within the process of LaTeX, i am able to access the items, for example in a loop. If i read a table from a file with "\pgfplotstableread" then it refuses to read in values with ...
9
votes
3answers
1k views

Pgfplotstable header in bold

I want to create a table using the pgfplotstable package. I've managed to get 95% of the formatting I want using the following: \usepackage{pgfplotstable} \usepackage{booktabs} % global settings \...
2
votes
0answers
30 views

Mark local maximum and calculate gradient in PGFplots

I'm using data from a tensometer to generate a stress-strain curve, but I want to find the yield point and the gradient between the start of testing and that point to calculate Young's modulus. Can ...
3
votes
1answer
23 views

pgfkeys - storing today's date with pgfplotstablenew, pgfplotstablesave

I'm working on making a simple tool to generate burn down reports/track task progress; this is my first foray into more complicated table manipulation so there's probably something pretty basic I'm ...
1
vote
0answers
26 views

pgfplotstable, multicolumn sp

I am trying to make a table (code below) that should contain three headings and five equally spaced sub columns but the one on the far right does not want to agree. If I make the really long heading ...
4
votes
1answer
123 views

“Logarithmic scale” for negative values

I have the following MWE: \documentclass{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{filecontents} \pgfplotsset{compat=1.12} \begin{filecontents}{data.dat} 4 -1e4 4 -1e3 ...
8
votes
3answers
2k views

pgfplotstable; longtable with caption and repeating header

I would like to use the pgfplotstable package in order to import data from a .csv file into a multi-page table. I would like for the table to have: a caption above it and its header to repeat at ...
6
votes
2answers
97 views

bold or higlight first row and column of tabe created from csv file

I'm using csvreader from csvsimple package to read csv data and create table from it. My goal is to bold or somehow highlight first row and first column. Here is my MWE: \documentclass{article} \...
2
votes
1answer
26 views

citations in pgfplotstable

So I'm calling data in to a pgfplotstable with \pgfplotstabletypeset[col sep=comma]{example.txt} which has been working fine, until I tried to include a citation in my example.txt file with \cite{...
1
vote
0answers
35 views

Linear regression with fixed point

I have a data set to which I want to add a trend line. For my system, there will always be a fixed point on (2, 0). I have the line representing this system, but currently I do not account for the ...
1
vote
0answers
43 views

Drawing multiple box plots from a file

I've got data in the following format n lw lq m uq uw 50 200 209 237 327 569 100 376 379 386 390 391 150 ... ... Where lw = lower whisker, lq = lower quartile, etc. I want to plot each box against ...
2
votes
1answer
25 views

pgfplotstable and longtable with caption is shown multiple times in tableslist

I'm visualizing a csv file using pgfplotstable and longtable as followed: \newcommand{\powerTable}[3]{ \pgfplotstabletypeset[ string type, col sep = comma, skip rows ...
5
votes
0answers
25 views

pgfplotstable show subset of rows?

I'm visualizing a csv with pgfplotstable as following: \pgfplotstabletypeset[ string type, col sep = comma, begin table=\begin{longtable}, end table=\end{longtable}, columns={{...
1
vote
0answers
48 views

PGPlots xtick label from a table

I am trying to load data from a table which looks like below and use the 'label' column for xticklabels. idx,label,value 1,20040101_20050108.rotation.summary, 19.470949839091155 2,20040101_20050115....
4
votes
1answer
44 views

Graph shifts position when adding plot

If I compile this code without the Gaussian function at the end everything is allright, but if I try with it the whole figure shifts to the right. In this example it is not a very big problem, but ...
2
votes
1answer
63 views

How to change the color background of a single cell in the last row

Using pgfplotstable, I want to color singular cells in the last row of an automatically created table based on csv-input. Since the length of the table differs, I need to color the last cell ...
0
votes
0answers
42 views

Longtabu in pgfplotstable from csv input with additional tikz lines

My question is based on this thread: Faulty table lines I have lots of csv-separated data e.g. in this format 11,22 33,44 55,66 ... and so on I'm creating tables automatically using the ...
0
votes
0answers
22 views

Multiple row in heading for tables

I have a problem formulating two rows in my heading of my table using pdfplotstable exporting csv file from excel. This is what i have: \usepackage{pgfplotstable} \documentclass[a4paper, 12pt]{book} ...
2
votes
1answer
32 views

pgfplotstable with .tsv file where the headers have underscores: How to avoid “Missing $ inserted”?

The file I want to show is a .tsv file that I cannot edit. It looks like this: up_gene up_chr up_strand up_Genome_pos APLP2 chr11 + 129991686 BACE2 chr21 + 42617990 BRDT chr1 + ...
3
votes
1answer
615 views

Conditional formatting, rounding and postprocessing of a column in pgfplotstable

I want to round p-values in a table to two decimals (for example 0.05), have values less than 0.05 in bold font and have values less than 0.01 to come out as '<0.01' in bold font. Like this (the ...
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 ...
4
votes
1answer
93 views

newenvironment using pgfplotstable

I want to have a newenvironment body as an inline input argument for pgfplotstable. Is it possible to do this without using braces in the body itself? \documentclass{article} \usepackage{...
3
votes
1answer
55 views

pgfplots - insufficient precision

I am having the following problem: Using pgfplots to plot some convergence graphs, I have to load a text file and do some computations. Most of the time everythings works just fine. But in some ...
0
votes
1answer
78 views

pgfplots: percentage in matrix plot

I'm trying to draw a matrix plot with the shown values in percentage. I already tried: nodes near coords = {\pgfmathprintnumber\pgfplotspointmeta\%} Unfortunately this didn't work out. Here is my ...
4
votes
1answer
54 views

pgfplotstableread{mydata.csv} VS table {mydata.csv} efficiency and capability for csv files pgfplots

I am trying to plot a very large .csv file with multiple columns using pgfplots. I want to use the first column for all my plots. My usual routine is to do something like: \addplot [solid] table [x=A,...
0
votes
1answer
44 views

Change Default row separator in pgfplotstable / order of commands for each line

I edited the question and added a MWE. Please feel free to change tags or the title of the topic since I'm not sure how to categorize my problem. I'm using the tabu package and pgfplotstable for ...
2
votes
1answer
36 views

Accessing Files with Spaces In Parent Directory Path

I'm having problems getting the pgfplotstable to compile because of issues with file path names containing spaces. I have read a bunch of other posts that say to just put quotes around things but none ...
1
vote
1answer
96 views

How to fill the parameters of `boxplot prepared` with data from table using PGFPlots?

I want to draw a boxplot using boxplot prepared@ Page 469 of pgfplots-manual; v1.13, with the values of lower whisker, lower quartile, median, higher quartile, and higher whisker from a data file. ...