{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
2answers
109 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
84 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 ...
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
200 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
126 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
80 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
83 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
104 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
63 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
58 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
41 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
55 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
56 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
259 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 ...
1
vote
1answer
37 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
62 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
62 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
34 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
186 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
121 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 ...
1
vote
1answer
77 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
192 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
253 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} ...
7
votes
1answer
411 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
104 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
115 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
150 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} ...
2
votes
1answer
66 views

Pgfmath misbehaving when reading negative values from table in Pgfplots

I am astonished that when I attempt to square a number read from a table with pgfplots, the result has the same sign. Consider this: \documentclass{standalone} \usepackage{pgfplots} ...
2
votes
1answer
313 views

Importing table from csv file

I have the following table in a avg_value.csv file: ,M23,F23_1,M36,F44,F63,M70 M23,1.00,0.81,0.88,0.83,0.41,0.82 F23_1,,1.00,0.52,0.56,0.25,0.94 M36,,,1.00,0.62,0.94,0.96 F44,,,,1.00,0.43,0.23 ...
3
votes
0answers
181 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 ...
2
votes
1answer
60 views

pgfplotstable - apply formatting to a range of rows

I'm looking to change the formatting (specifically the background color) for a range of rows using pgfplotstable. It is easy enough to do this for one row, e.g. the 6th row, using: every row no ...
5
votes
2answers
163 views

function epigraph possibly using fillbetween

I want to shade and label the epigraph (region above a function) of different functions in latex, and have tried to use fillbetween, though im not quite sure how to do this as usually I specify two ...
6
votes
1answer
483 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} ...
5
votes
2answers
320 views

Plotting triangle on voronoi diagram, shading fractions of triangles with pgfplots/Tikz

Using this previously asked question I was able to plot Voronoi polygons from a set of generated data. I would like to annotate the plot further by doing the following: SOLVED BY MANIPULATING INPUT ...
1
vote
1answer
107 views

Date/Time in both axes with PGFPLOT

I am trying to plot some data that contains date/time values in both the x and y axis. I have been using the pgfplots and have managed to plot date/times on the x axis and on the y axis separately ...
3
votes
1answer
77 views

beamer presentation with each figure on each slide using a foreach and pgfplots

Im doing a beamer presentation. With pgfplots I need to load a single column of a data file like this: 1 10 50 -50 2 11 51 -49 3 12 52 -48 4 13 53 -47 5 14 54 -46 6 15 55 -45 ...
5
votes
1answer
158 views

Subtract first row from each row and compute the relative differences

I am trying to create a new column from another one by subtracting from each row the first one. Then I want to create another column with the relative difference. \documentclass{article} ...
2
votes
1answer
46 views

plot and fit from pgfplottable

I would like to plot a graph from data created inside pgfplottable. I have one file of data data.dat: x,y 1,2 2,3 3,4 4,5 5,8 6,9 7,34 And this code : \documentclass{beamer} \usepackage{etex} ...
1
vote
1answer
43 views

Pgfplots not working with Pgfplotstable

I am writing a document using LaTeX which must contain both graphs and tables. For the graphs I have been using pgfplots and this has worked brilliantly. Now I needed to insert a few tables and was ...
2
votes
1answer
51 views

Which command to get words from table?

I have the following table: \begin{filecontents*}{table.dat} cane 1.5 gatto 3 \end{filecontents*} from which I have to take cells separately for the plot. The numeric values can be easily gotten ...
3
votes
1answer
137 views

Can you use `pgfplotstable` to do a linear regression to an expression?

I have a lot of data in a table, but it is not linearly related. I can linearize the relationship by computing functions (x expr and y expr expressions). I would like to use pgfplots to show the ...
1
vote
0answers
164 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 ...
2
votes
1answer
83 views

Regression with .csv tables

I am having trouble getting regression to work. If you wouldn't mind just looking over the code and point me in the right direction I'd really appreciate it. I have loaded pgfplots and pgfplotstable ...
3
votes
1answer
121 views

Colored circles from data

I have a data file which gives x-position (xpos), radius, and color. I wish to draw a circle at ever (xpos,0) with appropriate radius and color. How do I achieve that? I have used two approaches. ...
2
votes
1answer
184 views

PGFPlot no line between data points when reading from table

I have been searching stackexchange aswell as the pgfplots and pdfplotstable documentation. My problem is that when i read into the data from a *.txt file and I select the columns and rows i want to ...
4
votes
1answer
192 views

pgfplotstable: postproc cell content resets style of cell

I'm using pgfplotstable to create tables from .csv-files. But when I use postproc cell content to change the appearence of a specific cell, all former formatting of this cell seems to be ignored. How ...
1
vote
1answer
133 views

How to change font of specific (numerical) cell using pgfplotstable?

I'm using pgfplotstable to create tables from .csv-files. I would like being able to change the font of specific numerical cells. In particular, I would like to change the font of these cells to look, ...
2
votes
1answer
110 views

How to hide one column in a pgfplotstable

How can I hide the column parameter a (header and data) of the following table. \documentclass{article} \usepackage[letterpaper, margin=0.5in]{geometry} \usepackage{pgfplotstable} \begin{document} ...
2
votes
0answers
18 views

How can I force a specific order of magnitude in a column? [duplicate]

I have to process some tables with pgfplotstable which are stored in a .dat file I'd like to input without pre-processing it myself. The numbers in the columns are in scientific notation, and I'm ...