{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
46 views

Header skewed in pgfplot table

Can you help me fix my skewed header in this pgfplot. For some reason, the 'k' and 'z' headers are merged. Thanks. Here is my code: \documentclass{book} \usepackage{pgfplotstable} \pgfplotsset{...
2
votes
1answer
73 views

Pgfplotstable: display numbers exact as written in file

My file is U(V) I(A) I/U 0.00 0.000 0 0.31 0.020 0.065 1.15 0.075 0.065 1.82 0.120 0.0659 2.73 0.178 0.0652 3.42 0.224 0.0655 5.08 0.333 0.0656 6.24 0....
3
votes
1answer
44 views

bug in pgfplots+subcaption?

I'm using pgfplots (with the excellent matlab2tikz), pgfplotstable and subcaptionbox together, and for some inexplicable reason (at least to me), the command \pgfplotsforeachungrouped seems to break ...
2
votes
1answer
110 views

pgfplotstable with alphabetic characters input from csv

I'm reproducing an example from this tutorial. If the input from the csv file is numeric, it works well. However, if one of the columns of the csv contains alphabetic characters, it returns an error ...
6
votes
1answer
207 views

Stacked bar plot, percentage of entire bar and the total value

I have made quite a lot of progress of where I want to be, but there is still some fixes to be made. What I have right now as an image: However, as we can see, the percentage are all relative to ...
7
votes
1answer
232 views

PGFPlotsTable formatting problems

I am having a real hard time trying to format a simple numeric table with PGFPlotsTable. I have tried tons of combinations of TeX.SO solutions, I just cannot get any working result. The table looks ...
2
votes
1answer
66 views

Help with centering Table header in pgfplotstable

I would like some guidance to get my table's header to look like this: Here is my code: \documentclass{book} \usepackage{pgfplotstable} \usepackage{longtable} \usepackage{booktabs} \usepackage{...
6
votes
1answer
282 views

Place node at local maxima or minima of graph

Though there is an upvoted answer - the question is NOT answered. It turned out, that without smooth the resulting figure gets produced and looks alright, but the error remains. How to get rid of ...
4
votes
1answer
47 views

“Squeeze” tabulated data in pgfplotstable to fit in textwidth

is it possible to "squeeze" the text between the following columns so that the table can fit in the textwidth of the page (i.e. for the right end of the table to fall in line with the header line)? ]...
0
votes
1answer
87 views

Multicolumn in pgfplotstable header

This code is building from the post found here by a solution from Harish Kumar. I am trying to have some of the headers appear in a multicolumn. From my code, I wanted to get the 7th-10th column ...
1
vote
1answer
125 views

“Continued on next page” in longtable environment part 2

I am attempting to get the effect of the table to show "continued on next page" and "concluded" like that shown here. I am calling a longtable saved in the data.dat file (given below). Can you ...
0
votes
1answer
31 views

pgfplot table cannot compile

I am working of the post found here that talks about importing a .dat file into latex and converting it into a table. The table that I have is a longtable. I am having a problem getting my code to ...
1
vote
1answer
107 views

PgfPlots Histogram: wrong density on y-Axis

I want to make a pgfplots histogram to visualize the jitter of a 260 MHz clock signal. I want to use the probability density on the y-Axis. Yet, when I try this, the y-Axis does not display the ...
3
votes
1answer
53 views

Why does conditional formatting and dec sep align render values twice?

I want to use dec sep align and conditional formatting at the same time. Separately I managed to make them work, but together they double every value in the column. \documentclass[]{article} \...
4
votes
1answer
110 views

Problem defining a string column with PGFPlotsTable

First, I am fresh new with the PGFPlotTable package! I have the following CSV file that I would like to plot in a LaTeX table: truncatedtime;meanfinalfloatvalue;floatvaluedifference;datap2count;...
4
votes
1answer
320 views

PGF Math Error: Could not parse input as a floating point number

I am trying to print a table from .dat file. In the file there are some columns that are not numbers but words and I think this is the reason why I have this error. How can I fix it? \documentclass[...
1
vote
1answer
165 views

Setting “col sep = semicolon”

I obtain this table: using this code: \pgfplotstabletypeset[ col sep = comma, string replace*={_}{\textsubscript}, every head row/.style={before row=\toprule,after row=\midrule}, every last row/....
4
votes
0answers
126 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 \...
2
votes
0answers
39 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},...
3
votes
1answer
32 views

Marking single table values with dot alignment

I have a table with multiple columns that I have aligned with the S column type from siuntx. In each column I want to mark some special values in a clear and subtle way, I've used the * symbol for ...
4
votes
1answer
133 views

Barchart with pgfplot in beamer slides

I am trying to use a code in my beamer presentation for a barchart that I had previously used for an article type document. I am using TeXstudio as the editor. Everytime I try to compile, the ...
5
votes
1answer
254 views

pgfplots ybar plot with 2 y axes and equal shift on x axis

I am trying to create a ybar plot with two y-axes and proper alignment on the x-axis. I have two data sets to compare and what I'm trying to get is the look of a normal ybar plot with horizontally ...
3
votes
2answers
120 views

How to only truncate pgfplotstable integer entries, but not rounded floats?

I have a csv file conaining differently precise numbers. Now i want to plot them with precision=1. The reader should see that some values are integers, so the respective number should be shown without ...
2
votes
1answer
99 views

Align inline tikz nodes text with current line text (in table)

I have this table, where the first column has inline tikz nodes. I would like the text of the nodes to be vertically aligned with the text of the table. I found this question about his (among others),...
1
vote
1answer
67 views

Auto label points read from file

My question is the following, I read data from txt file where the data are stored as: North,East 1,5 4,7 a file with code \pgfplotstableread[col sep=comma, header=true {data.csv}\table; \addplot [...
4
votes
1answer
227 views

How to highlight pgfplotstable cells with bold font while preserving number format?

I want to highlight cells in my pgfplotstable, but the bold font setting overwrites my number format. How to prevent this? Here is a MWE: \documentclass[12pt]{standalone} \usepackage{filecontents} \...
5
votes
2answers
148 views

How do I automatically multiply columns by 100 to get percentage numbers in a pgfplotstable?

I have a csv file with percentages to load into a pgfplotstable. I already format them with siunitx but I did not find a possibility to shift the decimal point (multiply by 100) to get percentage ...
2
votes
1answer
98 views

How do I format a range of pgfplotstable columns at once?

I want to set a range of columns (1,2,3 in the MWE below) at once without overwriting the formatting of the first column. Therefore, I don't think an "all" columns solution is applicable. \...
2
votes
1answer
99 views

Math symbols in pgfplotstable

Suppose I have a file numbers.txt, whose contents are x y 1 2 3 4 50 20 I want to put this into a table using pgfplotstable, but while these numbers can change I want an additional ...
3
votes
1answer
108 views

How to correct a PGFPLOT plot with minimal data that does not follow global options?

I have incomplete test data, as shown in the MWE. I would like to use all (few) available data points in the plot, ie (55.16, 0.08) for copper, but the plot does not take it into account. Also the ...
1
vote
2answers
76 views

pgfplotstable missing error and strig type

I have searched for solution to my problem on using pgfplotstable, but I didn't find nothing useful. I'm using pgfplotstable to import csv data into my latex code. My table has four columns. The ...
1
vote
1answer
64 views

substring in addplot table

I want to add a figure which x label is symbols. But in data, the x label is longer than the figure's (because x label is abbreviated in figures). I want to know how to plot this kind of figure. The ...
1
vote
0answers
47 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
1answer
70 views

siunitx produces number too big error with large numbers

minimal (non)-working example: \documentclass{article} \usepackage{siunitx} \usepackage{pgfplotstable} \usepackage{filecontents} \pgfplotstableset{ header=true, trim cells=true, col sep=comma, ...
5
votes
1answer
62 views

Align pgfplotstable in enumerate

I want to align a table created with pgfplotstable to the top in an enumerate environment, but instead it's aligned to the center. How can I fix this? I'm looking for something like the [t] option for ...
2
votes
1answer
336 views

PGF plot color map contour plot from matrix data

I have succeeded plotting list data, generated from Matlab, as a contour in tikz-pgf using gnuplot. The data is arranged as 1,-6.2832,-6.2832,0.74038 2,-6.2832,-6.1563,0.74997 3,-6.2832,-6.0293,0....
1
vote
1answer
41 views

Problem centering subfloat

Try running this code removing one by one each \pgfplotstablegetelem. You will see that the 2 subfloats will move step by step to the center. Why? Keeping all of them the result is the following. I ...
1
vote
0answers
54 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 ...
3
votes
1answer
63 views

characteristic of a regression line

I have a little Problem with a regression line I made. I need it to be from its zero up to the x-value of the highest point. This is how it actually looks und underneath how I need it. Does anyone ...
1
vote
0answers
72 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
35 views

Remove default formatting from pgfplotstable. [closed]

I have some tables created using pgfplottable loading data from a csv file. The issue I am encountering is that the values are getting reformatted, for example a "2.00" in the csv is resulting in "2" ...
1
vote
1answer
198 views

\draw via \pgfplotstableforeachcolumnelement fails outside {axis} environment, but works inside?

Consider this MWE: \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \usetikzlibrary{calc} \pgfplotstableread[col sep=space,row sep=newline,header=true]{ ts val 0.0 0.0 1.0 ...
1
vote
1answer
123 views

Pgfplotstable: column math is wrong!

I am using the following code with pgfplotstable to generate a new column that represents the difference of two other columns. \pgfplotstableset{create on use/iqr/.style={ create col/expr={\...
1
vote
1answer
87 views

Get element from array

considering the generic table \mytable, to get an element from there I am using \pgfplotstablegetelem{\row}{[index]\column}\of\mytable. but if I don't have a table but an array? the case is this: \...
5
votes
3answers
215 views

Drawing a really large binary matrix as colored grid

I have a 50x300 binary marix, which I want to display as a colored grid. I tried the approaches of drawing a large binary matrix as colored grid which I like, but the approach using pgfplots table ...
8
votes
1answer
293 views

Histogram: different color for each bar

I have the following code. \documentclass[a4paper,twoside,12pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} \usepackage[english]{babel} \usepackage{pgfplotstable} \definecolor{...
7
votes
1answer
459 views

colour cells in a table according to the value

I have seen the following code in response to another similar question that works when the numbers in the table are between 0 and 100. How do I have to modify this code so that it works for numbers ...
3
votes
1answer
136 views

Get element from a table

I have the following table: \begin{filecontents}{table.dat} a 0.70 b 0.58 \end{filecontents} and I am trying to access at the elements with the command \pgfplotstablegetelem{0}{0}\of\table but ...
3
votes
0answers
122 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
1answer
154 views

pgfplotstable and _{some text} or ^{such text} in an string type column

So this is the second question I need to ask to get this table working: I'm using this: \documentclass{article} \usepackage[margin=1cm,a3paper]{geometry} \usepackage{siunitx} \usepackage[T1]{...