{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

1
vote
1answer
237 views

How to vertically align text in the headers of a PgfplotsTable?

I am stacking one header by using this macro: \newcommand*{\textstackrel}[2]{\ensuremath{\stackrel{\hbox{#1}}{\hbox{#2}}}}. This makes the other single line headers bottom aligned, which looks bad. ...
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) ...
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} ...
3
votes
1answer
148 views

Float pgfplotstable to right of text

I want to float a smaller table to the right of my text. Here is an example of the code: % Example Table \documentclass{minimal} \begin{filecontents*}{scientists.csv} name,surname,age ...
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 ...
2
votes
2answers
264 views

pgfplotstable line usage and wrapping

pgfplotstable seems ideal for incorporating CSV data into a table automatically. I'm however having trouble with lines (they won't merge with headers, and I can't seem to get them to work at the ...
8
votes
2answers
203 views

Reference table value in text

I want to be able to reference a table value in my text (this is because I often update my tables, and then list the specific values in the text). Here is an example table I would use: % Example ...
0
votes
1answer
143 views

Align right in table if no expression

I am using pgfplotstabletypset to read in a table -- I want all cells in the first column with the expression Factor in them to be aligned to the left and bolded, and I want all cells without that ...
8
votes
3answers
585 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' ...
2
votes
1answer
910 views

Caption with longtable and pgfplotstabletypeset

The 'longtable' documentation says to use \caption{Your caption here} for captions, but I can't see where to specify the 'longtable' options in the example where pgfplotstabletypeset and longtable ...
3
votes
1answer
104 views

Multiple multicolums table making the first row of data disappear. Also need tips on making it better looking

Following this question: Multiple Multi columns with pgfplotstable The first row of my data gets messed up somehow, here's the code: \documentclass{article} \usepackage{booktabs} ...
3
votes
1answer
527 views

Multiple Multi columns with pgfplotstable

I've already seen these two questions: Create a contingency table using pgfplotstable and Dec sep align & \multicolumn incompatibility? and I'm still not able to do what I want. I rarely use ...
7
votes
2answers
248 views

How to keep hue from going beyond 300° in xcolor/pgf? (Doing math in pgfplotstable)

Ok, this is probably an incredibly trivial question for anyone who knows more about xcolor or pgf or TikZ or whatever really. I tried to use a hue scale for a heat map/color matrix with values ...
4
votes
1answer
163 views

Pgfplotstable converting zeros to — in a knitr inline table

how do I change each 0.0 to -- without having to reference each as string type or making the whole table string type? The actual table is quite long and it would take too long to do it manually. For ...
5
votes
2answers
297 views

How to plot the graph below?

May I know how to draw the graph as shown below? below is a code I have try but with look and feel that is quite far away from the example: \begin{tikzpicture} \begin{axis}[ legend pos=north ...
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} ...
3
votes
2answers
804 views

Undesired quotes around values in table (pgfplot)

I am saving tables using write.table in R using the following code: x <- rnorm(100) y <- rnorm(100) z <- rnorm(100) model <- z ~ x + y results <- glm(model) pe <- ...
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} ...
5
votes
1answer
85 views

Extracting source from pgfplotstable

I like using pgfplotstable because I can feed data in tables directly to it and generate a latex table. However, not all of my coauthors have the right packages to compile pgf-enabled latex. Since ...
6
votes
1answer
230 views

Plots only logarithmicly spaced samples

I have a data file with many entries, order of 10000. I want to plot them all with lines, and a small subset of them with points and error bars (can not plot error bars on 10000 samples). Plotting ...
3
votes
1answer
283 views

Filter by value when reading and calculating data using pgfplotstable

I am trying to plot data from a file, using pgfplots for the plot and pgfplotstable to read in the data and calculate a new column (cummulative values from another row), which is plotted as well. My ...
2
votes
1answer
137 views

Formatting a custom column in pgfplotstable

Following up on my question on PGF custom columns I've successfully created a column but now I'm struggling to format it to fixed, two digit precision. This seems a little hair trigger in terms of ...
3
votes
1answer
254 views

Pgfplotstable adding a growth column without column names and then offsetting it

I'm trying to create a new column in a pgfsplotstable which shows the compound growth over the preceding columns. The columns don't have names, and I want to shift the column a little to the right to ...
4
votes
1answer
200 views

pgfplotstable: two columns into one but removing text (keeping numbers) from new column

Question: This is a followup up to pgfplotstable: Two columns into one with numeric data, but can't round. Except this time, I have some text throughout the mean and sd column and would like to ...
5
votes
1answer
138 views

How to display every 4th row in a large data file using pgfplotstable?

Question: I am trying to select certain rows, similar to this question Selecting rows to be displayed with pgfplotstable, however I am not sure how I would go about doing it. I want to display only ...
2
votes
0answers
263 views

pgfplotstable an caption below data [closed]

I'd like to have a pgfplotstable with the caption below the data, just like with a regular table: \begin{table}[h] \centering \begin{tabular}{lccc} A & 3 & 4 & 6 \\ B & 4 & ...
2
votes
1answer
322 views

Adding a knitr table from R into a \pgfplotstableread statement

I'm trying to get a table from R into a pgfplotstable to edit for printing. the r code is \documentclass{article} \usepackage{pgfplotstable} \begin{document} \pgfplotstableread[format=inline,row ...
8
votes
2answers
202 views

What is wrong with this TeX macro

Still soldiering on with trying to learn these macros. Can someone tell me why this isn't working? The macro \mycline{n-n} is supposed to expand to \cmidrule{1-1} ... \cmidrule{n-n}, but in my code ...
4
votes
1answer
299 views

How to align \vrule partial vertical lines in a pgfplotstable

I had a look at this post on Misaligned multicolumn but it doesn't really solve my problem. I have the code below which is supposed to produce a table with a blue line for the first row and red lines ...
6
votes
1answer
221 views

pgfplotstable: Two columns into one with numeric data, but can't round

Question: Relates to the question posed here. I have made one column from two, but I would like to round the numbers off from a precision of 4 to 2. How do I do that? Here is the MWE: ...
4
votes
1answer
125 views

Using #1 literally in a macro

In this post I found some working code that I am now using quite frequently: \documentclass{article} \usepackage{pgfplotstable} \begin{document} \pgfplotstableread{ num value 1 2 ...
1
vote
0answers
2k views

Creating .dat files and reading a .dat file in pgfplots [closed]

The first question I have, is about creatinga .dat file in Mac. How can I create a file containing columns of data with .dat format in Mac OS Lion? What I did was to create the file using TextEdit, ...
3
votes
1answer
156 views

Macro to outline a cell in pgfplotstable

Still struggling with the \expandafter and \noexpand tex macros. I'm trying to put a table together using pgfplotstable. In this case the code is something like \documentclass{article} ...
10
votes
2answers
1k 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, ...
3
votes
1answer
362 views

pgfplotstable selecting numeric columns or multiple columns by index

Hi two questions in one: I haven't been able to figure out the answer from the manual: I have a table of data with strings in the first column: I'd like to apply some key-values (e.g. fonts by ...
4
votes
2answers
339 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} ...
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 ...
4
votes
1answer
134 views

How to use pgfplotstable's iflessthan key

pgfplotstable offers the iflessthan key to define a custom comparison function: /pgfplots/iflessthan/.code args={##1##2##3##4}{<...>} I just don't know how to use it, there's no example in the ...
3
votes
1answer
221 views

A macro for looping through a pgfplotstable set by cell

Hi following on from the following question on multi-line headers with pgfplotstable, the solution was to set each affected cell individually. I decided to throw together a command to do that but keep ...
4
votes
1answer
378 views

Multi line header for pgfplotstable

I have a dataset in csv file format that I'm loading into pgfplotstable. I can't change the format of the original csv, and being financial data it has a column of item names and two or three ...
7
votes
1answer
306 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} ...
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 ...
6
votes
1answer
318 views

Dec sep align & string type cell incompatibility?

I would like to use the dec sep align feature of pgfplotstable while having certain cells containing text. I tried this: \documentclass{article} \usepackage{pgfplotstable} \usepackage{booktabs} ...
3
votes
2answers
117 views

pgfplotstable, round-off error

I'd like to do some simple computation in my table and it looks like I'm seeing some round-off errors. Does anybody know the precision that pgfplotstable uses internally? Is there any work around ...
9
votes
1answer
174 views

Can I use | as column separator in pgfplotstable?

I want to use | as column separator in the CSV file. Because it looks clean, so I won't feel headache to edit the CSV file directly. I have checked the manual, it seems the option col sep accepts ...
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 ...
0
votes
0answers
57 views

Pgfplot with two ordinates y tick base position [duplicate]

Possible Duplicate: position of axis multiplier and one other I have a plot with two ordinates. The tick base for the "right" y-axis is "10^-3". However, the "*10^-3" is placed on the left ...
3
votes
1answer
140 views

Replace Column in PGFPlotstable with lookup values

I have a table that has a column of integer values representing atomic numbers. I know of the command: string replace={---}{\textemdash} However this is table-wide. I want to match the values in a ...
6
votes
1answer
755 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 ...
5
votes
1answer
404 views

Filter table rows for regression

I have a table containing a flag and x and y values. I'd like to have a regression for all rows with 1 in the first column. How can I do this? \documentclass{article} \usepackage{array} ...