{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 ...
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 ...
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} ...
7
votes
3answers
856 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 ...
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 ...
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 ...
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:
3
votes
1answer
96 views

Sorting according to more than one key in pgfplotstable

Is it possible to sort rows of a pgfplotstable according to multiple keys? For example, input file is as follows: Mtx Kind P Sp A LP 16 4.2 C OPT 16 72.5 A LP 64 20.3 B OPT 16 ...
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 ...
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 ...
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} ...
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 ...
5
votes
2answers
433 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 ...
1
vote
1answer
99 views

using data column as “axis” in table with pgfplotstable

I'm new to pgfplots/pgfplotstable and got the following problem. I got a datafile like the following I use for plotting with pgfplots: P1 P2 Value 1 1 0.00000000000e+00 1 2 1.00000000000e-02 1 3 ...
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 ...
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 ...
7
votes
1answer
656 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 ...
4
votes
2answers
294 views

How to rotate head row cell entries of pgfplotstable

How am I able to rotate the first entries of a table with pgfplotstable? I have the following table and want to rotate the descN labels in the first row. \documentclass{article} ...
9
votes
1answer
459 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
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
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} ...
7
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 ...
6
votes
1answer
673 views

How to expand linear regression fit to the full x-axis range while using semilogyaxis

Since I was asked in another post: Trend line or line of best fit in pgfplots to ask this question explicitly, I'm now doing so: How can I expand the linear regression fit, generated with for ...
5
votes
1answer
284 views

Read boxplot prepared values from a table

Update: Is there any possibility of drawing two box plots this way using a single datatable as in the updated MWE below? I'm trying to use pgfplots 1.8's shiny new boxplot feature. As I am also ...
4
votes
1answer
238 views

Create square and custom size cells in a table using pgfplotstable

I'm trying to create something like a confusion matrix of several classes. Thus, I want to display only the shades of the values. I manage to do it using this: \documentclass{article} ...
4
votes
1answer
427 views

Putting multiple columns from csv file into single column while printing the table using pgfplotstable

Reference: My question which was answered by Dr. Christian Feuersänger Link to the question.. This is a follow-up question. The MWE (Provided by Dr. Christian Feuersänger in his answer) ...
4
votes
1answer
640 views

Long table and pgfplotstable with multiple data files

I have two csv files: namespgf.csv Sl. No., Reg. No.,Name,Category,Group,Gate,Sponsored,Department 1,MS001,Ajay-D-Vimal Raj P,PY,OBC,--,No,Physics 2,MS002,Harish Kumar,PY,GE,GATE,Yes,Physics ...
3
votes
1answer
717 views

edit x-y data from different files/tables

I've two one column data files (A.txt and B.txt). To plot them together first I load dataA with \pgfplotstableset{ create on use/dataA/.style={create col/copy column from table={A.txt}{0}} } Then I ...
3
votes
1answer
506 views

Show last N rows from input datafile only in \pgfplotstabletypeset

I would like to limit the rows in \pgfplotstabletypeset to the last N rows. I can skip rows by doing this: \pgfplotstabletypeset[skip rows between index={0}{4}]{file.data} But this only works if I ...
2
votes
1answer
171 views

Dec sep align & \multicolumn incompatibility?

As I did not get any answer, I decided to split the two question so that they appear less daunting. The initial question I am referring to is this one Here is a table with regular alignment mixed ...
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 ...
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 ...
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} ...
5
votes
2answers
528 views

pgfplots: Displaying a bar graph and a table from the same input file

I try to display on one Beamer slide a bar graph and a table with numbers taken from the same input file (to avoid repetition when copying the data). For now, I am stuck on this error message: ...
5
votes
1answer
1k views

How can multiple pgfplotstable columns be used in a legend?

I'd like to plot a few sets of data using the groupplots library of pgfplots. On each plot, I'd like to add a few other pieces of data that do not change from plot to plot. So I put the plot ...
4
votes
1answer
750 views

Filter rows from a table

I have a large table that contains results for many instances, and I want to make separate tables and plots grouped by one (or more) field. In this minimal working example, I want to make a table and ...
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 ...
7
votes
1answer
847 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
178 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
263 views

Continue long table beside on the same page

I have a datatable in a CSV file and print it with pgfplotstable. I can split long datatables by making pgfplotstable use longtable instead of tabular environment; so far so good. My problem is that ...
6
votes
1answer
376 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
351 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 ...
3
votes
1answer
1k views

Accessing individual table elements with pgfplots?

I want to create a plot using a non-standard plot-style that I don't see in the pgfplots manual. It would be nice if I could take advantage of the \pgfplotstableread function and then somehow loop ...
9
votes
1answer
879 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
882 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
155 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
198 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
273 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
144 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} ...