Tagged Questions

{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

5
votes
2answers
159 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} ...
9
votes
1answer
431 views

Page header with box sections & page border

So I'm currently working on converting some documents used in our university to use LaTeX, and I'm stuck on a bit of a hangup. I've been able to nail down all the basics, using plotting, etc; but I ...
6
votes
1answer
303 views

Draw reduced graph with pgfplot

I want to reduce the information contained in a graph to the minimum. I started with a spectrum that I drew from a data file ( http://www.sendspace.com/file/wwydju ). \documentclass{standalone} ...
3
votes
2answers
238 views

One verbatim column in pgfplotstable and a non-verbatim header

I wanted to create a pgfplotstable in which one column would be treated as verbatim. I first tried to straightforwardly use \verb but I almost expected this to fail spectacularly and it did. I found ...
6
votes
2answers
177 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 ...
4
votes
1answer
590 views

pgfplotstable manage strings and values

I like the pgfplotstable package for reading and plotting tables but handling of strings and values (especially when strings contain spaces) drives me crazy... I often use a table as shown here: ...
5
votes
1answer
132 views

How to implement the macros style with mixed chars and floats in a csv file?

I would like to implement macros to generate multiple tables in a document. Some inspiration comes from here: usage-of-longtable-or-equivalent-and-pgfplotstabletypeset The input csv file and ...
12
votes
1answer
1k 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 ...
12
votes
1answer
235 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 http://tools.ietf.org/html/rfc4180#section-2 Neither ...
7
votes
1answer
160 views

for loop in pgfplots

I have a file with 3 columns, space separated. The first two columns represent the center of a circle (x,y) and the last column is the circle radius. I want to select every 4 rows (or more generally ...
13
votes
2answers
449 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 ...
4
votes
1answer
624 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 ...
3
votes
1answer
394 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
189 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
335 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
883 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
364 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
315 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
239 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
456 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
127 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
93 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
354 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
815 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
98 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
117 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
114 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
208 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
116 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
180 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
65 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
295 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
146 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
361 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
608 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
236 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
870 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
110 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
463 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
188 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
437 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
596 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
343 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
239 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
142 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
106 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 ...