{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

6
votes
1answer
170 views

Combining a style with individual post-processing

I’m working on a paper in which I present numerous big tables, all of which should be formatted in the same way. In every table, some entries should be highlighted, e.g. typeset bold. So I want to ...
7
votes
1answer
1k 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.
5
votes
1answer
169 views

String annotations to scatter plot coming from a different file

I am trying to adapt the setup to be found in this question. to the case where the names are in a different file. The main motivation is to have the same names for several plots and to be able to ...
6
votes
1answer
698 views

Fitting a curve from a table! (Tikz/Pgfplots)

I ploted the data from the table below (first vs. fourth column), 3000 1.2970e+00 0.198956 0.258046 3100 8.6050e-01 0.18747 0.161318 3200 5.7970e-01 ...
3
votes
2answers
535 views

Pgfplots \closedcycle introduces unwanted slope

I'm trying to plot two graphs with the area between them filled. This works fine, except for the fact that the \closedcycle does not go down vertically, but rather at some (arbitrary?) slope, circled ...
3
votes
2answers
254 views

adding row numbers to a pgfplotstable

I've had a look at the attached answer Automatic table row numbers but I'm not sure how to apply it to pgfplotstable. I'd like to get automatic rownumbers on my table so I can apply formatting by row ...
3
votes
1answer
308 views

pgfplotstable: centering colums and adding vertical lines

I'd like table to have centrally aligned columns and a vertical line between columns 2 and 3. This was possible before I included the 'dec sep align' code but afterwards the columns shifted to the ...
2
votes
1answer
268 views

Externalize pgfplotstable with csv file

This is a direct follow-up question to this: Adding units to pgfplotstable header After fixing the output I tried outsourcing the table. After figuring out that standalone does not work with ...
6
votes
1answer
200 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 ...
4
votes
0answers
56 views

Decimal number in axis tick using: “x tick=data” [duplicate]

I have found the following problem during the building of an histogram: \documentclass[a4paper,11pt]{article} \usepackage{pgfplots} \pgfplotsset{/pgf/number format/use comma,compat=newest} ...
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 ...
5
votes
1answer
81 views

Assign initial value to \pgfmathaccuma

I cannot assign zero initially to \pgfmathaccuma and \pgfmathaccumb. It gives this error: ! Missing number, treated as zero. Then I press s to skip. However, \pgfmathaccumb is always empty! I want ...
3
votes
1answer
95 views

Dynamically add row depending on the values using PgfplotsTable

Consider the rows in table testdataExisting.dat: If type=0, vala must be put in a row. valb should not be displayed. If type=1, vala must be put in a row and valb must be put in the subsequent row ...
3
votes
1answer
295 views

Changing the default file path for \addplot table {myfile}

Is there a way to add a file path prefix (ideally defined by a key) to the "argument" of \addplot table. Something like \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{% table file ...
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: ...
6
votes
2answers
745 views

pgfplotstable: read gnuplot generated table and typeset

I am new to pgfplotstable, I am trying to read gnuplot exported table in pgfplotstable. gnuplot script: set samples 91 set table "file.dat" set angles degrees plot [0:90] sin(x),cos(x),tan(x); ...
4
votes
1answer
108 views

pgfplotstable: Why does `postproc cell content` not work properly when used within a style?

I use pgfplotstable and want to post-format a specific column. Among other things I need to duplicate its content. My problem is that postproc cell content works fine as a direct parameter to ...
6
votes
1answer
175 views

Use \textquotedbl in repeating cells in pgfplotstable

I have Table 1. Repeating values in consecutive cells of a column should be replaced with \textquotedbl as in Table 2. Also \textquotedbl should be aligned centered according to column width although ...
4
votes
1answer
918 views

pgfplotstableread fails to read the input file

I am trying to typeset two different tables in a moderately large document. The data for the tables are written as comma-separated values in two different .csv files. I am including the different ...
8
votes
2answers
111 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.
3
votes
1answer
163 views

Postprocess row with pgfplotstable

I am trying to surround all elements in a specific table row with square brackets, using postproc cell content in pgfplotstable. As shown in the MWE, it works well for processing a column, but not ...
3
votes
1answer
109 views

Splitting a row into several rows in pgfplotstable

I have data set as follows: id vala valb 1 24 75 2 56 87 In this data set, there are two value types: vala and valb. The number of types may change, it can be three, four, etc. I ...
4
votes
1answer
269 views

How to remove multiply-defined label in pgfplotstable using longtable

I need to add caption to a longtable possibly with a label to reference in text, however SIAM format fails when it encounters multiply-defined labels because of the repeated caption. Is there an easy ...
4
votes
1answer
62 views

Expanding a macro into a long list for use with pgfplotstable

Failing again to get macros to work. I have the following M(n)WE \documentclass[10pt]{article} \usepackage{pgfplotstable} \begin{document} \xdef\mydef{ \foreach \a/\b in ...
6
votes
2answers
307 views

Align pgfplotstabletypeset and plot left and right

I can't get the plot and the pgfplotstabletypeset to align so that they are right next to each other. Is this possible at all? Please help me. This is what it looks like at the moment: This is my ...
2
votes
1answer
124 views

Excluding every nth row in pgfplotstable

I need to exclude every 0th, 3rd, 6th ... row from a table. \pgfmathparse{Mod(#1, 3) == 0} did not work inside row predicate/.code={}, it gives following error: ! Package PGF Math Error: Sorry, the ...
2
votes
1answer
314 views

read strings from csv file for usage as figure meta data

I got the following problem, I use pgfplots(table) to generate plots and tables in my latex document from generated data. I would like to read additional information from a metadata file. The reason ...
3
votes
1answer
532 views

Postprocessing floating point numbers

A computed column, columnWithFloatingPointNumbers, is added to the table, \table. Then I am trying to compute geometric mean of this newly-added column. However I get this error: ! Package PGF Math ...
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 ...
7
votes
1answer
213 views

Postprocessing pgfplotstable results using siunitx

I am trying to use the \num command from siunitx inside a table made with pgfplotstable, because I need the format given by siunitx with \sisetup{scientific-notation = true} and all the advantages of ...
8
votes
3answers
584 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' ...
3
votes
1answer
95 views

Force re-reading a data file

I have a data file from which I want to plot odd/even rows seperately, in the same axis. But the table options seem to apply only once, when reading in the data, which only happens once per axis (i.e. ...
4
votes
1answer
415 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 ...
7
votes
1answer
998 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 ...
5
votes
1answer
373 views

Pgfplotstable and multirow

In the following example, I'm trying to typeset a table using pgfplotstable with an every even row rule. Is there a way to deactivate it for some given columns ? Or alternatively, is there a way to ...
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
1answer
217 views

How to make pgfplotstable read tables with macros

I want to migrate my tables to pgfplotstables. I used to have a macro for the rows of my tables, partly, because Kile used to. So currently, my tables more or less look like: oldtable: ...
2
votes
0answers
566 views

pgfplotstable error: missing \endcsname inserted [closed]

I'm getting strange errors with pgfplotstable: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{pgfplots} \pgfplotsset{compat=1.7} ...
8
votes
2answers
136 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 ...
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 ...
0
votes
1answer
161 views

Stacked chart in TeX (added up line loads)

I've got a problem with finding the correct way or commands to make a nice plot in TeX, even with some basic experience in pgf/TikZ. Imagine a weight distribution with start- and stop values and a ...
3
votes
2answers
180 views

line-breaking inside multirow environment in a pgfplotstable

I want to combine two string columns into one column. The contents of the columns should be in two lines, i.e., first column's content must be in the first row of the combined column and second ...
10
votes
2answers
341 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 ...
3
votes
1answer
337 views

Double row heading in pgfplotstable

Good day all! I store tables on CSV files and use pgfplotstable package to call the files. This works fine but I have a challenge. I need to bring the units in bracket (i.e (MeV) and (mb/MeV/sr) ...
4
votes
1answer
105 views

Parametrized Column Names for Pgfplotstable inside a Macro

I use same table format for several data files, so I have written a macro named \tableMacro. The problem is: I need to include different columns in different tables. I want to parametrize columns={} ...
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 ...
4
votes
1answer
611 views

Plotting functions with parameters from an external file using gnuplot/pgfplots/pgfplotstable

If I have a table, how can I get the table values and use them as parameters for plotting in pgfplots in gnuplot? In particular, how can multiple curves be plotted with the same functional form from ...
4
votes
1answer
284 views

PGFPLOTS coordinate filtering as a style?

I am using pgfplots to make plots for my thesis, and I have many scatter plots that I want to have consistent formatting. I am controlling the shape and color of the scatter plot marks with two ...
6
votes
1answer
440 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
181 views

Using Hashtag in macro

I had a problem putting the column headers in bold (in a table of course) using pgfplotstable. You can see the problem here I found a way to work arround that. It isn't generic as I wanted it to be, ...