{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

9
votes
3answers
716 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
1k 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
111 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
632 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
275 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
184 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
357 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
300 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} ...
4
votes
2answers
1k 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
435 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
87 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
245 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
344 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
149 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
271 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
226 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
158 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
301 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
340 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
203 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
327 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
250 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
129 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
3k 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
163 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
443 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
385 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
299 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
146 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
238 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
457 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 ...
8
votes
1answer
339 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
199 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
355 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
126 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
203 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
5k 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 ...
4
votes
1answer
154 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
876 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 ...
6
votes
1answer
457 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} ...
4
votes
1answer
253 views

Using dashes with siunitx with pgfplotstable

I have a table setup that is mostly numerical columns. However, there are occasionally some cells that have a blank entry, currently the in the excel csv file output as "---". Everything worked ...
2
votes
1answer
359 views

Manually add a literal column to a table loaded from a file

I would like to use pgfplotstable to typeset some numbers stored in a text file. I have used \pgfplotstableread to achieve that and it worked all right. Now I want to add a column to the said table ...
3
votes
1answer
416 views

column separator in header line in column with dec sep align

I'd like to have a column with vertical bar separators. When I set the number format to 'dec sep align' the vertical separators disappear. Here is a MWE: \documentclass{article} \usepackage{array} ...
3
votes
2answers
196 views

Adding a x tick but not the corresponding y tick

I'm generating pgf plots on the fly and I would like to avoid adding non integer y ticks on my plots, while keeping all the x ticks. Here is a MWE: \documentclass[10pt]{article} \usepackage{tikz} ...
9
votes
2answers
2k 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 ...
3
votes
1answer
602 views

How to plot coordinate between two xticks?

I want to plot some data using pgfplot. Here is a code I have written: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat = 1.3} \begin{document} \begin{tikzpicture} \begin{axis}[ ...
6
votes
1answer
754 views

Pgfplotstable without headings row

I would like to typeset a table with a multicolumn heading only. Here is my current attempt \documentclass{article} \usepackage{pgfplotstable} \usepackage{booktabs} \usepackage{array} ...
2
votes
1answer
324 views

pgfplots: how to check if addplot filters all data

is there an easy way to check if a \addplot(+) table [...] command in PGFPLOTS has any drawn any points? The reason is that I want to process the data dynamically, and if the plot is empty, the legend ...