{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

29
votes
2answers
2k 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 ...
18
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:
15
votes
2answers
3k 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 ...
13
votes
2answers
375 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
3k 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 ...
13
votes
2answers
107 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 ...
12
votes
2answers
1k 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 ...
12
votes
2answers
267 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
850 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
2answers
138 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} ...
11
votes
2answers
597 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
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 ...
11
votes
1answer
760 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} ...
10
votes
3answers
3k 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 ...
10
votes
1answer
157 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
586 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 ...
10
votes
2answers
310 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 ...
9
votes
2answers
725 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 ...
9
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} ...
9
votes
1answer
371 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
357 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
117 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
460 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
2answers
893 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, ...
9
votes
1answer
165 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
275 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, ...
9
votes
1answer
191 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 ...
9
votes
1answer
881 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
1answer
114 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} ...
8
votes
2answers
200 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} ...
8
votes
2answers
365 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
306 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
1answer
254 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 ...
8
votes
1answer
1k 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
723 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 ...
8
votes
2answers
162 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
65 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 ...
8
votes
1answer
219 views

Formatting an array of complex numbers with pgfplotstable

Say I have two csv files representing the real and imaginary part of a complex matrix. I would like to nicely display this matrix in LaTeX. The difficulty is to correctly round numbers and not ...
8
votes
2answers
109 views

\sffamily with \pgfplotstable

I'm trying to create a table using pgfplotstable. It works almost fine, just asking myself why \sffamily in front of \pgfplotstabletypeset is not working.
8
votes
1answer
124 views

Help with a simple bar plot

I have some data in a table; the first column has some names; the second column associates a "category" to each name, and the third column associates a "section" to each name. All entries are ...
8
votes
1answer
753 views

pgfplots need help with complicated stacked bar chart using selected rows from data table

I'm trying to recreate this bar chart from the data table found in the MWE below. It involves doing a couple things that I can't figure out: stack positive and negative bars on the same axis, ...
7
votes
3answers
857 views

Write a column selectively to the appropriate row using pgfplotstable?

Description: I have a .csv file named namespgf.csv Reg.No.,Name 5501,Kathirvelu A 5502,Gugan K 5503,Kalaitchelvi S 5504,Suresh S 5505,Mahesh K and another .csv file named markspgf.csv number,marks ...
7
votes
2answers
232 views

How to keep hue from going beyond 300° in xcolor/pgf? (Doing math in pgfplotstable)

Ok, this is probably an incredibly trivial question for anyone who knows more about xcolor or pgf or TikZ or whatever really. I tried to use a hue scale for a heat map/color matrix with values ...
7
votes
2answers
350 views

Change \pgfplotstabletypeset font size

I have a table with strings and fixed numbers. I need to set \footnotesize only to typeset it using \pgfplotstabletypeset. How can I change font size ?
7
votes
2answers
122 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 ...
7
votes
3answers
486 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' ...
7
votes
1answer
657 views

Calculate and draw difference of two plots automatically

I'm trying to automatically generate a plot, which visualizes the difference of two other plots. The input source is a single(!) file. The data is filtered by one column with /tr/rowfilter. Here is an ...
7
votes
1answer
2k views

Stacked barplots and 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: With Excel it didn't seem to be a problem but when I tried adapting it with pgfplots ...
7
votes
1answer
134 views

for loop in pgfplots

I have a file with 3 columns, space separated. The first two columns represent the center of a circle (x,y) and the last column is the circle radius. I want to select every 4 rows (or more generally ...