{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

3
votes
1answer
355 views

How to use `ybar interval` without skipping the last value

I have the following code \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{filecontents} \begin{filecontents}{testdata.dat} -3.316988309367815e-07 ...
6
votes
1answer
180 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 ...
6
votes
1answer
303 views

How to change format of xticklabel when loaded from table

I have the following code \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{filecontents} \begin{filecontents}{testdata.dat} 6.3e-05 0.8767984145412976 ...
7
votes
1answer
2k 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.
6
votes
1answer
778 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
1answer
336 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
286 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
216 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 ...
7
votes
1answer
412 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
0answers
57 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
123 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
84 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
323 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
754 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: ...
3
votes
1answer
96 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 ...
8
votes
1answer
1k views

Define error bar color in scatter class

I'm using scatter/classes to define color and markers for a plot, and I would like to specify the error bar color this way as well (to match the marker color). I have seen the error bar colors in ...
4
votes
1answer
114 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 ...
4
votes
1answer
1k 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 ...
3
votes
1answer
111 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 ...
6
votes
1answer
188 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 ...
8
votes
2answers
114 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
171 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 ...
4
votes
1answer
63 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 ...
4
votes
1answer
276 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 ...
2
votes
1answer
132 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 ...
6
votes
2answers
329 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 ...
3
votes
1answer
566 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 ...
7
votes
1answer
224 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 ...
6
votes
2answers
808 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); ...
3
votes
1answer
101 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
436 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 ...
6
votes
1answer
172 views

How to use only mathematical input in the first column with pgfplotstable

I can use a mix of text and mathematical input in the first column of a table generated with pgfplots with no problem, and also mathematical input in, e.g. the last column, as this mwe shows: ...
5
votes
1answer
401 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 ...
2
votes
0answers
582 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} ...
6
votes
1answer
322 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
224 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: ...
8
votes
2answers
139 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
104 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 ...
3
votes
2answers
191 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 ...
5
votes
1answer
179 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 ...
0
votes
1answer
163 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 ...
2
votes
1answer
338 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 ...
10
votes
2answers
359 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 ...
4
votes
1answer
107 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={} ...
4
votes
1answer
648 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 ...
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
298 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
472 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
189 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, ...
6
votes
2answers
582 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 ...