{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
0answers
640 views

How to add marks to all graphs at certain y level

I'd like to add markers to my plots only at certain y levels. How to do this for certain x levels is obvious, I didn't manage to do it inversley though. What I have (equi-x): What I want is ...
5
votes
0answers
39 views

Skip some x tick labels when using `xtick=data`

I am plotting some csv data with \documentclass[border=10pt]{standalone} \usepackage{tikz} \usepackage{pgfplotstable} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \begin{document} \begin{...
5
votes
0answers
25 views

pgfplotstable show subset of rows?

I'm visualizing a csv with pgfplotstable as following: \pgfplotstabletypeset[ string type, col sep = comma, begin table=\begin{longtable}, end table=\end{longtable}, columns={{...
5
votes
0answers
61 views

pgfplotstable longtabu repeating header and other options

I want to print a long table with pgfplotstable and long tabu. For some reason, with the following code, I do not get the header repeated on every page. I also want a \bottomrule and a caption on ...
4
votes
0answers
40 views

pgfplots: Plotting one subfigure per country, from datafile

I have data in csv format at the country-year level, and using pgfplots I would like to plot a given variable over time, with one subfigure per country. My idea was to use a groupplot environment: and ...
4
votes
0answers
132 views

Calculate x-coordinate for given y-value by interpolating data from pgfplotstable

I have a text file data.txt with the following content: -2 -2 +1 +0 +1 +3 +2 +4 +2 I read it with \pgfplotstableread{data.txt}\data and then plot the second column by the first column with \...
4
votes
0answers
752 views

pgfplots: howto read touchstone files (s1p, s2p, s3p,…)

With pgfplots you can simply create nice plots that seamlessly integrate into your TikZ figure. As a high frequency engineer you will inevitably use a network analyzer to measure S-parameters. The de ...
3
votes
0answers
126 views

Pgfplots: Transpose headrow as first column in: confusion matrix with colormaps / heatmaps

My question builds on code from this question: original question/answer What I am trying to achieve: I want to use pgfplots to build a table, where the header row is automatically added as first ...
3
votes
0answers
227 views

import a long tab delimited data file with first row as the header

Here's a very simple task that I don't seem to be able to get the format right. In short, I am trying to import and format a long tab-delimited txt file, with the first row as the header. I tried the ...
3
votes
0answers
223 views

How can I use \multicolumn in a \pgfplotstable table?

In my experiments with pgfplotstable, I've run into some bumps: merging multiple columns adding formatting commands to text within cells Problem I cannot seem to properly add a \multicolumn{}{}{} ...
3
votes
0answers
509 views

PGFPLOTSTABLE configuration, bold style for headers, specific row, and specific formatting from CSV

I am starting to use the package pgfplotstable as it seems to be a powerful tool and is able to do what I'd like to do. I am importing custom CSVs, and as these will change over time, I need to plot ...
3
votes
0answers
86 views

post-process cell content in one column based on another column

I am trying to do something quite similar to this post: pgfplotstable: Conditional post-processing of cell content on a per-column basis However, I'd like to post-process the column based on the ...
3
votes
0answers
199 views

Importing Data from CSV file to Latex Table

I am running WinEdt 9.0, MikTex 2.9 on windows 7 pro. I am constructing a standard format PDF report and must follow that format (ie the table is in a particular format with colors and fonts etc etc)...
3
votes
0answers
276 views

Conversion of big “amount” of seconds into HH:MM:SS when plotting timeseries with pgfplots

My aim is to plot a timeseries (experimental data) using pgfplots in LaTeX (pdfLaTeX, TexLive on Mac). The data I'm using is seperated with semicolons (columnwise) and has the following structure: -- ...
3
votes
0answers
304 views

One tabular with column input from multiple data files with pgfplotstable

I have a question which sort of extends the page Multiple Files input to one pgfplotstable. In the answer to this question, data is read from dataB.dat and subsequently appended to the data as ...
3
votes
0answers
182 views

Barchart, Boxplot Data Table PGF Math Errors from mixed format inline data

My code for a horizontal bar chart with a summarizing boxplot is coming together, but I still have a nagging PGF Math problem if I try to plot the boxplot values, which are commented out at the bottom ...
3
votes
0answers
291 views

Redefinition of pgfplotstableread and inline tables

I had to redefine pgfplotstableread because I use it in standalone files in an extra img/ folder that loads data from a different data/ folder as follows. \begin{filecontents}{plot.tikz} \...
2
votes
0answers
30 views

Mark local maximum and calculate gradient in PGFplots

I'm using data from a tensometer to generate a stress-strain curve, but I want to find the yield point and the gradient between the start of testing and that point to calculate Young's modulus. Can ...
2
votes
0answers
72 views

longtable with pgfplotstable - adding predefined rows and breaking manually

Based on this link pgfplotstable; longtable with caption and repeating header I wrote this MWE: \documentclass{article} \usepackage{longtable} \usepackage{booktabs} \usepackage{multirow} \usepackage{...
2
votes
0answers
52 views

Highlight first rows and first columns of a pgfplotstable

I'm trying to change the background color of the cells FOO and BAR and also the ones with the values (1 and 2) in the following MWE: \documentclass[12pt]{article} \usepackage[active,pdfpage,tightpage]...
2
votes
0answers
67 views

How to get rid of the following error with pgfplots?

When I am running the following code with data.txt file... \documentclass{standalone} \usepackage{tikz,pgfplots} \begin{document} \pgfplotstableread{data.txt}\Rtable \begin{...
2
votes
0answers
57 views

Filter rows and create separate (sub)tables using pgfplotstable

I have following CSV file: Type Desc A B A Site-A 1 2 A Site-A 2 3 A Site-B 1 2 A Site-C 2 3 B Site-A 1 2 B Site-A 2 3 B Site-B 1 ...
2
votes
0answers
69 views

How to wrap header in pgfplotstable environment

I am using pgfplotstable to import .csv file to LaTeX. I successfully wrapped column texts using p{width} command in each column type which also prevented me from centering the columns and which didn'...
2
votes
0answers
41 views

Adding a Trend Line to a dateplot

How could I add a trend line to this plot? Many thanks! \begin{tikzpicture} \begin{axis}[ date coordinates in=x, xtick=data, xticklabel style= {rotate=90,anchor=near xticklabel},...
2
votes
0answers
331 views

Legend entry for each point in scatter plot with matching color

I have a file with multiple columns, of which I create scatter plots where positions are given from column 1 vs column 2, while the mark color is based on column 3. I now wish to automatically create ...
2
votes
0answers
162 views

pgfplotstable: typset csv with 2 or more header lines (eg. name, unit, comment)

I am exporting from Origin and get a Data.csv like this: Short_Name1; Short_Name2 Long_Name1; Long_Name2 Unit1; Unit2 Comment1; Comment2 1,1; 2,0 3,5; 4,3 When I try to ...
2
votes
0answers
234 views

problems inserting commas in tables - pgfplotstable

I have a table I want to import into an appendix. The last column is a source key, and there are several sources in each cell I want to list as a, b, c; d, f, m; etc. However, the problem is the are ...
2
votes
0answers
254 views

PGFPlotstable with data from csv file : character µ and _ in column header

I have searched for a long time on the internet (here and other LaTeX resources on the web) but I could not find the answer to my (simple) question: how could I draw a table with Pgfplots, with data ...
2
votes
0answers
398 views

Pgfplotstable multicolumn table with dec sep align and Tabularx

I would like to implement a multicolumn table with Pgfplotstable that aligns on one side the number of the columns by dec sep align and secondly aligns the whole table by Tabularx. A version without ...
2
votes
0answers
263 views

Possible to create \pgfplotstablenew without header?

I'd like to create a (pgfplots)table from scratch, however, one without a header. So I'm trying to modify one of the examples in the pgfplotstable documentation: \documentclass{article} \usepackage{...
2
votes
0answers
458 views

Getting the (variable) number of columns per row with pgfplotstable?

I've already seen PGFplots and table with different number of elements in columns; but this is a slightly different question... Consider the following MWE: \documentclass{article} \usepackage{...
2
votes
0answers
214 views

Pgfplots: date range and integers as input data

I have a data table that looks something like: Week,value 2010-01-03 - 2010-01-09,0 2010-01-10 - 2010-01-16,0 2010-01-17 - 2010-01-23,0 2010-01-24 - 2010-01-30,0 2010-01-31 - 2010-02-06,0 2010-02-07 -...
2
votes
0answers
192 views

How can I manipulate data in a PGFPlots Table using l3int?

I need to provide statistical functionality to some of my TeX-trainees and I'd like to leverage the intuitiveness of l3int and the expressiveness of pgfplots and its table helper package. So, as a ...
1
vote
0answers
44 views

Why pgfplots sometimes cycles markers and colors and sometimes doesn't?

Why the following examples differ considering line color and markerstyles? First one draws black lines with no markers. Same thing happens when I add plots with \addplot table [x index=0, y index=1]{...
1
vote
0answers
24 views

pgfplotstable: trouble reading data from file with leading zero

when i create a table within the process of LaTeX, i am able to access the items, for example in a loop. If i read a table from a file with "\pgfplotstableread" then it refuses to read in values with ...
1
vote
0answers
26 views

pgfplotstable, multicolumn sp

I am trying to make a table (code below) that should contain three headings and five equally spaced sub columns but the one on the far right does not want to agree. If I make the really long heading ...
1
vote
0answers
35 views

Linear regression with fixed point

I have a data set to which I want to add a trend line. For my system, there will always be a fixed point on (2, 0). I have the line representing this system, but currently I do not account for the ...
1
vote
0answers
43 views

Drawing multiple box plots from a file

I've got data in the following format n lw lq m uq uw 50 200 209 237 327 569 100 376 379 386 390 391 150 ... ... Where lw = lower whisker, lq = lower quartile, etc. I want to plot each box against ...
1
vote
0answers
48 views

PGPlots xtick label from a table

I am trying to load data from a table which looks like below and use the 'label' column for xticklabels. idx,label,value 1,20040101_20050108.rotation.summary, 19.470949839091155 2,20040101_20050115....
1
vote
0answers
13 views

Current file relative paths and pgfplotstableread

For my latex documents I employ a structure like this: pictures doc1 doc2 ... To allow quick editing my picture folder contains a testfile. While I successfully use the import package to allow my ...
1
vote
0answers
36 views

`string replace` before plotting

The package pgfplotstable defines a key string replace* that can be used to replace strings inside a typeset table (in \pgfplotstabletypeset); for instance (quoting from the manual) \...
1
vote
0answers
99 views

Pgfplotstable: Filter specific rows when reading from file

So far I have a file from which I read data to the macro \data (in the MWE I replaced the file with an in code table). From this table only 3 rows are selected and printed. What I would like to ...
1
vote
0answers
38 views

Insert an \hline once, after the nth row in pgfplotstable

In the pgfplotstable documents, there is an example where you can input \hlines in every couple rows: \pgfplotstabletypeset[ every nth row={3}{before row=\hline}, % insert hline every 3 rows ...
1
vote
0answers
70 views

Highlight extreme values and show dashes for empty values in pgfplotstable

I am using @jake's solution to highlight extreme values with pgfplotstable. doc.tex \documentclass[]{article} \input{table.tex} % table.tex includes Jake's code \begin{document} \begin{table}[ht] ...
1
vote
0answers
48 views

Preload and preprocess data with pgfplotstable for use with \addplot

I'm creating grouplots for various datasets. Apart from some y-values, they all share the same x-values. In the past I used something like this to do the task: \addplot table [x index = 0, y expr = \...
1
vote
0answers
55 views

pgfplots - Define a extra x tick for the x interaction of a regression line

I have a regression line of some points and need a extra x tick at the x interaction of this regression. I could just calculate the value and make the tick by extra x ticks={x1} but I have to make ...
1
vote
0answers
77 views

single plot from rows of two files

I'm trying to plot data coming in from two different files. I want to combine the rows. So in \addplot I try to plot the data from both the files blindly expecting tex to combine them on a single plot ...
1
vote
0answers
201 views

print empty cell in Latex

I have an array stored in csv file from Python program as : W = [ 1, 2, , 4, , 5] I want to print the array in Latex as : W 1 2 4 5 I have ...
1
vote
0answers
131 views

Calculate pearson correlation, r in pgfplots

Is it possible to calculate the pearson correlation, r or r^2 value from a linear regression using pgfplots? I already have the curve and would like to display the r value in the legend. I couldn't ...
1
vote
0answers
180 views

Bar plot with y-error and nodes near coords

I have to plot some data as a bar plot. These data is processed with pgfplotstable, so I can plot the mean and the error for my data. Now I want to print the nodes near coords for each of the bars; ...