{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

32
votes
2answers
3k views

Drawing heatmaps using TikZ

Introduction I want to create a heatmap using TikZ. You can see the basic idea in the picture below: I basically have a table of values and each value is assigned a color. The picture is the result ...
19
votes
2answers
1k views

Highlighting Extremal Values in Table

In a table generated by pgfplotstable, how can I highlight for each column or row the cell with the minimum value (e. g. displaying the corresponding entry in bold face)? Example:
16
votes
3answers
4k views

Image with axis

I need to plot some data in a file (10000 records of 2 points each one) but PGFPlots is very very slow rendering it. So I'm trying to use MatLab to plot the data, capture the image without axis and in ...
15
votes
2answers
5k views

pgfplot: plotting a large dataset

I try to plot a dataset which is large using pgfplots. Since I'm aware of problems with large files, I used the external mode. I additionally increased main_memory from 3000000 to 6000000. It crashes ...
14
votes
1answer
2k views

How to use a string column with pgfplotstable to label datapoints in a pgfplot?

I have a comma-separated list of data points. They should be plotted as a scatter plot, and should be labeled using data from the .csv file. Having specified the first column of my file as string ...
14
votes
1answer
1k views

Selecting rows to be displayed with pgfplotstable

I have a table, read from a file, and I would like to display only rows which have a specific value in a given column. Here is an ECM: \documentclass{minimal} \usepackage{pgfplotstable} ...
13
votes
2answers
465 views

Combine columns of a csv

I'm attempting to use \pgfplotstabletypeset but with no luck. I have a CSV file like the following: Name, Age, stDev Adam, 15, 3 When I output in this into my PDF, I would like the last two columns ...
13
votes
2answers
2k views

Stacked bar plots with several descriptive nodes

I have a stacked bar plot where I would like to display additional information for each bar—besides their cumulative values. This information should include the non-cumulative values and the ...
13
votes
2answers
135 views

Making a table independent of pgf

I use pgfplotstable to generate tables to be included in online submission to journals. I would like to make my paper independant of pgfplotsable because compilation of the document is made online ...
13
votes
2answers
183 views

'e+08' (don't suppress 0) notation in columns with S-specifier

for symmetry reasons in a large table I want the scientific format with 2 digits (i.e. e+08). By default it suppresses the 0. Here is what I do: \documentclass[]{article} \usepackage{siunitx} ...
12
votes
2answers
300 views

A macro to typeset a difficult table

The following table was created with the following LaTeX-code (mwe): \documentclass{article} \usepackage{tabu} \usepackage{multirow} \begin{document} \newtabulinestyle{stip=on 1.5pt off 2pt} ...
12
votes
1answer
2k views

Stacked barplots/groupplots with text labels in x-coordinate

I was trying to stack a groupplot, or was it grouping a stacked plot? However I was trying to get something like: The ybar stacked option works quite nice here. But when I try to adapt it to a ...
12
votes
1answer
1k views

Plot x y data from different files/tables

I have two data files (xxxx.txt and yyyy.txt), each only containing one column of x and y data respectively. Now I want to plot these two data together in a simple 2D diagram. Has anybody an idea how ...
12
votes
1answer
1k views

How to right align columns but center align header row using pgfplotstable?

I am a newbie with pgfplotstable: I would like to right align the columns of the table containing my data, but keep the headers center-aligned. Here is the code for the tables - does anyone know how ...
12
votes
1answer
249 views

Render rfc4180 compilant CSV as table

Is there a LaTeX package, which would import data from csv and honour the quotation escaping? To be exact I mean one using the rules 1. - 7. of http://tools.ietf.org/html/rfc4180#section-2 Neither ...
11
votes
3answers
5k views

Convert numpy array into tabular

I am doing some data analysis in python, putting the results in form of a matrix stored into a numpy array. I would like to put this results into a report and the best way would be to put a table with ...
11
votes
2answers
826 views

PGFplotstable: Is it possible to set a number format for a *row* instead of a column?

Using pgfplotstable, it's straightforward to set a column number format using columns/(columnname)/.style={(format)} What I would like to do is change the number format of a particular row. In my ...
11
votes
1answer
576 views

PGFPLOTS: Show x labels for every second tick

How can I show xaxis labels for every second data in this dataset. I want a bar for each tick, but not a label. \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} ...
10
votes
2answers
433 views

How can I draw a pretty population pyramid graph with pgfplots?

I'm trying to plot a graph population pyramid. I wrote this MWE. \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \begin{document} \pgfplotstableread[col sep=comma]{ ...
10
votes
1answer
2k views

Table typesetting with pgfplotstable

I have two questions concerning pgfplotstable and number formatting with pgf. Consider the following piece of code: \documentclass{article} \usepackage{pgfplotstable} \usepackage{amsmath} ...
10
votes
2answers
779 views

pgfplotstable or datatool?

What are differences, which to use for including .csv, .tsv files ? Datatool ? pgfplotstable ? I've seen at question : How typeset a numeric table from a CSV file how person asked about fixing ...
10
votes
1answer
303 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 ...
10
votes
1answer
1k views

Multiple Files input to one pgfplotstable

I have several data files that I would like to combine into one table using pgfplots table. Specifically, I would like to use one file to set the first three columns and then have each data file fill ...
10
votes
2answers
1k views

pgfplotstable: How to access column name?

I have used \pgfplotstableset to assign column names in the preamble. However, I don't know how to access them. \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots, pgfplotstable, ...
10
votes
2answers
409 views

pgfplots: get color setting from table

I want to plot multiple lines using pgfplots. Each of the lines should have a color, depending on the group it belongs to. In the example attached, a table is provided, containing all the ...
10
votes
1answer
1k 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 ...
9
votes
2answers
3k 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} ...
9
votes
3answers
716 views

Is it possible to make a pgfplotstable smaller? Reduce spaces and maybe draw vertical lines between columns?

My table is too big and won't fit a page, so I wanted it to be a little smaller. Maybe reduce spaces between each column and draw a line instead. Adding column type/.add={|}{}% results in '|c' ...
9
votes
2answers
2k views

Compiling a document with PGFplots processing only every x-th data point? [duplicate]

Possible Duplicate: How to select a finite number of samples from the file when plotting using pgfplot Compiling my document with many PGF Plots, each containing thousands of data points ...
9
votes
1answer
456 views

Page header with box sections & page border

So I'm currently working on converting some documents used in our university to use LaTeX, and I'm stuck on a bit of a hangup. I've been able to nail down all the basics, using plotting, etc; but I ...
9
votes
1answer
529 views

How can I fit the original data with exponential or polynomial functions via pgfplots?

I am trying to plot the following data with a curve fitting via pgfplots. It seems linear regression is not suitable for my case. So I would prefer to have exponential or polynomial curve fitting on ...
9
votes
1answer
164 views

Is there an easy way to change the column order of a pgfplotstable?

I am aware of Rearrange data in pgfplotstable but I was hoping for a kind of one-pass solution that doesn't spread the table over so many commands but is rather self-contained within ...
9
votes
1answer
2k views

How can I filter/select data from a table and plot it?

I have a table with data from a file and before anything, I sort the data. Then I would like to filter only the rows that have a specific value. There has been a similar question which almost contains ...
9
votes
1answer
458 views

Pgfplotstable: how can I add percent signs (and respect dec sep align)?

My data contains a column with numbers like 0.01 or 0.9412 which I want to display as 1.00% and 94.12% . I would like to declare the column by means of dec sep align. How can I do that? [This ...
9
votes
1answer
977 views

pgfplots: How to ignore the last line of a data file?

I need to plot data files which contain a comment in the last line, like this: 0 2 4 1 5 7 2 9 5 3 11 15 4 10 15 THIS WAS: TOTAL Now, pgfplots seems to have a problem with that giving me ...
9
votes
1answer
305 views

Sum up rows from different data files

I've a certain amount of inputfiles (.txt) for the final definition of the y-data of my axis environment. The x-data come from a different file. The goal is to sum up each row of the input files ...
9
votes
1answer
652 views

Heatmap of a triangular matrix (or a sparse matrix)

So let me first of all shamelessly steal heatmap code from this answer to Drawing heatmaps using TikZ \documentclass{standalone} \usepackage{colortbl} \usepackage{pgfplots} \usepackage{pgfplotstable} ...
9
votes
1answer
203 views

Can I use | as column separator in pgfplotstable?

I want to use | as column separator in the CSV file. Because it looks clean, so I won't feel headache to edit the CSV file directly. I have checked the manual, it seems the option col sep accepts ...
9
votes
1answer
426 views

Conditional format for correlation table

I'm using the script by Christian Feuersänger: \documentclass{standalone} \usepackage{colortbl} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotstableset{ /color cells/min/.initial=0, ...
8
votes
2answers
203 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
3answers
287 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
148 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
2answers
435 views

How to draw multiple Rectangles from input data file

I want to draw set of rectangles on axis based on input file. My .tex file should be some thing like that \documentclass{article} \usepackage{tikz,pgf} \usetikzlibrary{plotmarks} ...
8
votes
1answer
339 views

Get the number of columns of a table

Consider the following plots \documentclass{article} \usepackage{pgfplots} \begin{document} \pgfplotstableread{ 1 3 6 4 2 2 5 2 3 4 4 1 4 5 2 3 }\table \begin{tikzpicture} \begin{axis} ...
8
votes
2answers
256 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
1answer
478 views

Pgfplots linear regression (mean square error)

Pgfplots offers the possibility to compute a linear regression, as in the following post Linear regression - trend line with pgfplots . However, is it possible to compute the mean square error ? My ...
8
votes
2answers
235 views

Reference table value in text

I want to be able to reference a table value in my text (this is because I often update my tables, and then list the specific values in the text). Here is an example table I would use: % Example ...
8
votes
1answer
2k views

Create a contingency table using pgfplotstable

I'm trying to create a general pgfplotstable style for displaying contingency tables (the below example being taken from Wikipedia) of any sort but I am having trouble computing the totals for each ...
8
votes
1answer
1k 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 ...
8
votes
1answer
74 views

Pgfplotstable ignores chars in filename

I am using the ignore chars key from the pgfplotstable to ignore some characters in a table. However, I have noticed that it also removes characters from the file name and I am wondering if this is ...