{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

31
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 ...
15
votes
3answers
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
395 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
900 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
755 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
4k 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 ...
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:
15
votes
2answers
4k 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 ...
3
votes
1answer
101 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
694 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 ...
14
votes
1answer
869 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
279 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
548 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} ...
6
votes
2answers
525 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
100 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 ...
13
votes
2answers
423 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
240 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 ...
13
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 ...
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 ...
4
votes
1answer
117 views

PGFplots and table with different number of elements in columns

I am trying to plot a table where I have different number of elements in the columns. In the MWE, the pairs (x1,y1),...,(x4,y4) all have different number of elements, can I use PGFplots in such ...
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 ...
8
votes
2answers
1k 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 ...
7
votes
1answer
381 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 ...
7
votes
1answer
725 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 ...
4
votes
2answers
338 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} ...
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} ...
9
votes
1answer
397 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 ...
6
votes
1answer
752 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 ...
2
votes
1answer
106 views

How to plot stacked bar plot inside table?

I have following code in Latex. Which plots only one data series (data2). I would like to plot staked bar plot inside table for both data1 and data2 with different colours. Any ideas.? Many thanks. ...
6
votes
1answer
267 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} ...
6
votes
1answer
512 views

How can LaTeX code in a data file be read by pgfplotstable?

I would like to place some LaTeX math code in the columns of a file to be read by pgfplotstable. Unlike How to use underscores with pgfplotstable?, I would like the columns to be formatted so LaTeX ...
4
votes
1answer
455 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
683 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 ...
4
votes
1answer
209 views

PGFPlot two \pgfplotstableregressiona

Hi i have two plot with two linear regression but the legend show the same equation for the straight line... I haven't made a MWE because I thought it isn't needed---Is it? \pgfplotstableread{ X Y 97 ...
4
votes
1answer
550 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 ...
3
votes
1answer
890 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
3answers
248 views

How to use underscores with pgfplotstable?

I have an input file like this: some_entry 123 another_entry 456 yet_another_entry 789 and I want to typeset it as a table with: \pgfplotstabletypeset[col sep=space]{FILENAME} Problem is that ...
2
votes
2answers
91 views

Wrong placement (and/or size) of picture / plot with groupplot of table (… and discontinuity)?

Consider this MWE: \documentclass{article} % \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.5.1} \usetikzlibrary{pgfplots.groupplots} \usepackage{pgfplotstable} ...
2
votes
1answer
181 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 ...
5
votes
1answer
995 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 ...
10
votes
2answers
293 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]{ ...
9
votes
1answer
352 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, ...
12
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 ...
12
votes
2answers
281 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} ...
6
votes
1answer
302 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 ...
5
votes
2answers
699 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
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 ...
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 ...