Questions tagged [pgfplotstable]

{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}.

Filter by
Sorted by
Tagged with
50 votes
3 answers
16k 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 ...
Manuel's user avatar
  • 687
38 votes
4 answers
56k 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 ...
user11170's user avatar
  • 483
26 votes
4 answers
17k 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 ...
Fernando Nadal's user avatar
25 votes
2 answers
4k 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:
Stephan's user avatar
  • 261
21 votes
2 answers
14k 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 ...
Oliver's user avatar
  • 505
20 votes
2 answers
12k 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 from a ...
Ingo's user avatar
  • 19.6k
19 votes
1 answer
23k views

reading and processing data in pgfplots

I have a standard text file, two columns, space separated, containing x and y data to be plotted. I want to plot x vs -y, i.e. plot(x,-y). In general, how do you read your data and plot a function ...
eli's user avatar
  • 721
19 votes
2 answers
8k 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 ...
Claudio's user avatar
  • 1,967
19 votes
1 answer
6k 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 type,...
Ingo's user avatar
  • 19.6k
18 votes
1 answer
43k views

How to make a plot from table data?

Having the following table: How can we make a plot diagram showing the relation between P,Q? I would like the P-value on y-axis and the Q-values on the x-axis.
Y_gr's user avatar
  • 3,232
18 votes
3 answers
19k views

pgfplots multiple plots in one file

In pgfplots is it possible to have several plots in one datafile? The goal is to add about 20 plots, which has different number of points and not the same x-value, to the same axis. (app. 350 points) ...
hpekristiansen's user avatar
17 votes
2 answers
3k 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]{ age,...
leonardo cesar's user avatar
17 votes
1 answer
6k 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 ...
SciGradStudent's user avatar
16 votes
1 answer
4k 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 ...
philosodad's user avatar
  • 1,314
16 votes
1 answer
3k 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} \begin{...
mikael-s's user avatar
  • 375
15 votes
1 answer
5k 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} \begin{...
user8947's user avatar
  • 277
15 votes
1 answer
3k views

Plot x y data from different files/tables [duplicate]

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 ...
David K.'s user avatar
  • 613
14 votes
2 answers
4k 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 ...
caustic's user avatar
  • 1,047
14 votes
3 answers
4k 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 \...
morcillo's user avatar
  • 885
14 votes
2 answers
2k 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 ...
Grzegorz Wierzowiecki's user avatar
14 votes
1 answer
2k 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} \...
M. Toya's user avatar
  • 3,177
14 votes
1 answer
6k 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 ...
LCFactorization's user avatar
14 votes
1 answer
7k 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 ...
wonder's user avatar
  • 261
14 votes
1 answer
6k views

How to plot scatter points using pgfplots with color defined from table rgb values?

I am trying to plot a set of data points (scatter points not linked to each other), where each point has a different color. The color definition is given by predefined rgb values written in the same ...
Nicolas's user avatar
  • 1,794
14 votes
1 answer
5k 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} \usepackage{...
user2146441's user avatar
  • 1,216
13 votes
2 answers
1k views

Plot one function per row of table

I want to plot a polynomial that is parametrized by an additional parameter d. I took samples of the domain of d and stored the coefficients of the polynomial for each of these samples in a table: d ...
Nobody moving away from SE's user avatar
13 votes
3 answers
6k 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 the ...
user17426's user avatar
  • 233
13 votes
2 answers
3k 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 ...
Trevor's user avatar
  • 2,959
13 votes
1 answer
3k 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 ...
Philipp's user avatar
  • 3,795
13 votes
2 answers
6k 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, ...
devendra's user avatar
  • 2,788
13 votes
1 answer
5k 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 ...
zun's user avatar
  • 814
12 votes
5 answers
2k views

Coloring negative and positive numbers automatically

I believe numprint.sty is not working. at least the manual states that Printing negative numbers in red does not work. Only the minus sign is printed in red. When was this bug introduced? Some ...
ivo Welch's user avatar
  • 3,595
12 votes
2 answers
2k 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 ...
sachinruk's user avatar
  • 427
12 votes
1 answer
4k 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 ...
Allan's user avatar
  • 243
12 votes
2 answers
656 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} \begin{...
Archibald's user avatar
  • 463
12 votes
2 answers
2k views

How can I use variables (or formatting commands) in a header row of a \pgfplotstable table?

My first reaction to reading the pgfplotstable manual was: Why would anybody in their right mind use the tabular environment for generating tables? Advantages of pgfplotstable No need to specify ...
Jonathan Komar's user avatar
12 votes
3 answers
5k 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\\ ...
Martin Thoma's user avatar
  • 18.3k
12 votes
1 answer
3k views

Pgfplotstable one row in bold

Considering this MWE, I am looking to obtain bold style on a row. The highlight's style works on columns but not on row. \documentclass{standalone} \usepackage{pgfplotstable} \begin{document} \...
Guuk's user avatar
  • 1,483
12 votes
1 answer
3k 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 ...
Lorzen's user avatar
  • 1,191
12 votes
1 answer
8k views

Create a contingency table using pgfplotstable

I'm trying to create a general pgfplotstable style for displaying contingency tables (the below example is taken from Wikipedia) of any sort but I am having trouble computing the totals for each row ...
ThomasH's user avatar
  • 942
12 votes
2 answers
339 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 ...
M. Toya's user avatar
  • 3,177
12 votes
1 answer
2k 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 ...
wonder's user avatar
  • 261
12 votes
1 answer
710 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 \...
Christian's user avatar
  • 18.7k
12 votes
2 answers
679 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} \...
Gerlind Schubert's user avatar
12 votes
2 answers
2k 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 ...
Tobi's user avatar
  • 121
12 votes
1 answer
521 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 https://www.rfc-editor.org/rfc/rfc4180#section-2 Neither ...
Jakub Bochenski's user avatar
11 votes
3 answers
3k 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' ...
hfingler's user avatar
  • 631
11 votes
1 answer
2k 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} ...
Christian's user avatar
  • 18.7k
11 votes
1 answer
2k views

How can I center *and* decimal-align a PGFPlots table?

Here is the code I am working with: \documentclass{article} \usepackage{filecontents} \begin{filecontents}{measurements.dat} sample num-bugs num-part other-measure another 5 80 190 ...
Sean Allred's user avatar
  • 27.2k
10 votes
2 answers
557 views

Contingency table with pgfplotstable: dealing with large integers

This is a direct follow-up of https://tex.stackexchange.com/questions/62409. Jake showed how to create a contingency table with the pgfplotstable package (and booktabs). Integer size limitations hit ...
PatrickT's user avatar
  • 2,798

1
2 3 4 5
23