Skip to main content

Questions tagged [pgfplotstable]

{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}.

Filter by
Sorted by
Tagged with
0 votes
1 answer
18 views

Displaying table content within a pgfplot [duplicate]

I've got a table with a binary column named xrayOn. Instead of plotting this, I want to write each xrayOn value (i.e. 0 or 1) at the position (index, 1) in a node. However, in the code below only the ...
luwi's user avatar
  • 13
0 votes
1 answer
54 views

Automatically integreate min/max/mean values from a table into the text

suppose I have the following table. Is it now possible to automatically determine values such as Min/Max/Mean from the respective columns and integrate them into a continuous text? The text should ...
mingabua's user avatar
0 votes
0 answers
19 views

Splitting lines on comma in pgfplotstable

I use pgfplotstable like this: \pgfplotstableset{ every even row/.style={ before row={\rowcolor[gray]{0.9}}}, every head row/.style={ before row={\hline \rowcolor[gray]{0.7}}, after row=\hline }, ...
Nicolas Goy's user avatar
0 votes
0 answers
31 views

Contour gnuplot from data in external file

I'd like to create a contour plot of data stored in the file "test.dat". There should be one continously shaded contour plot and then I'd like to "highlight" some contour lines ...
Phil_B's user avatar
  • 1
0 votes
1 answer
34 views

I would like to know how can I correct the mistakes in this plot

I need some help to correct my plot in Latex (overleaf). as you can see int eh photo attached I was not able to move the left Ylable more to the left. I addition the legend are overlapping. I would ...
Yogan Felipe Sganzerla's user avatar
1 vote
1 answer
48 views

Shade between x-values given in an external file - pgfplots

I'd like to achieve the following plot: \documentclass[a4paper]{article} \usepackage{pgfplots} \pgfplotsset{compat=1.17} \begin{document} \begin{filecontents}{data.txt} start,end 1,23 51,69 106,165 ...
cedi123's user avatar
  • 43
0 votes
1 answer
119 views

What will be the overleaf code for this table

[![Estimated effects of ribavirin compared with no treatment on mortality outcomes from studies][1]][1] This is cation of table This is table link [1]: https://www.ncbi.nlm.nih.gov/pmc/articles/...
Maryam's user avatar
  • 53
0 votes
1 answer
35 views

Create static variable inside of \pgfplotstableset definition

I try to understand, how to create a variable inside or outside of the \pgfplotstableset environement which is static and will not be resetted all the time. Probably this is a generic question for ...
PascalS's user avatar
  • 750
2 votes
1 answer
14 views

Changing font of first column in table using pgfplotstabletypeset

Using pgfplotstabletypeset, I would like to specify that every entry in the first column be typeset using \bfseries\sffamily\small, but I'm not sure how to do so. I attach a MWE. \documentclass{...
tgkolda's user avatar
  • 748
1 vote
1 answer
43 views

Restrict domain of plots with data coming from different files

I would like to plot some data where the x axis values come from one file and the y axis values come from another file. However, I also want to restrict the domain of the plotted data. For example, ...
Meclassic's user avatar
  • 1,827
1 vote
1 answer
32 views

pgfplots plot difference between columns of table gives wrong results

This code compiles fine, but gives wrong results: \documentclass{article} \usepackage{pgfplots, pgfplotstable} \pgfplotsset{compat=newest} \begin{filecontents*}{data.csv} 1,2,5 2,4,6 3,5,8 4,7,10 5,8,...
Simon's user avatar
  • 325
1 vote
0 answers
25 views

Formatting Specific Rows/Columns/Entries in pgfplotstable

I have an external program to compute several tables that I will then place in TeX (separately) using pgfplotstable. The table will have possibly a dozen columns and hundreds of rows with various ...
mathematics2x2life's user avatar
2 votes
1 answer
53 views

Fill area under curve points

So, I have this code and I need to fill area under curve points. How can I do that? a) First, I need to fill area under curve points from x = 1 to x = 5 b) I need to complete fill area. Thanks. \...
Pedro Salgado's user avatar
0 votes
0 answers
12 views

pgfplotstable: compute averages of columns

\documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotstableset{ create on use/mean/.style args={#1#2#3}{ create col/expr={(\thisrowno{#1} + \thisrowno{#2} + \...
Simon's user avatar
  • 325
2 votes
1 answer
79 views

Distinguish between multicolumn and single column based on the cell content in pgfplotstable [duplicate]

I have a .csv file like this: \begin{filecontents}{data.csv} type,Description,Value typA,Description0,Value0 typA,Description1,Value1 typB,Description2,Value2 typA,Description3,Value3 \end{...
PascalS's user avatar
  • 750
1 vote
2 answers
70 views

fill between curve and y axis

The following code fills the area between the function and the x-axis but the compiler ignores the fill between the function and the y-axis. I tried range= on the second fill because domain= seems odd ...
TonyK's user avatar
  • 647
2 votes
2 answers
115 views

pgfplotstable: Change to multicolumn row depending on input data

Let's say I have a huge amount of data rows structured in a simple .csv and these data rows could be divided in different data types. In the MWE I just added two types (typA & typB). In case the ...
PascalS's user avatar
  • 750
0 votes
1 answer
32 views

How do I place vertical spacing between my imported csv table and surrounding text?

What I would like is to have vertical spacing between the top of the table and the paragraph above it, and the bottom of the table and the paragraph below it. My specification in my preamble is: \...
Michelle's user avatar
  • 551
2 votes
1 answer
27 views

Unobvious behavior when adding a column to pgfplots table

I've noticed a peculiarity in pgfplots/table package. I don't know if it's a bug or a feature. Error code \documentclass[]{standalone} \usepackage{pgfplots, pgfplotstable} \begin{document} \begin{...
sergiokapone's user avatar
  • 5,598
1 vote
1 answer
58 views

Fill a 3D object plot

I want to draw an object in 3D an fill it entirely. The object is defined in [0,1]^3, and I know the upper limit function, and lower limit function. The problem is I know how to draw the upper and ...
G. Ander's user avatar
0 votes
1 answer
54 views

PGFplot - Find duplicates within \pgfplotstablecreatecol

Based on this question, I try to find duplicates in my generated hash list. These could be there, because I accidentally used the same X & Y values or because the first three digits of the hash's ...
PascalS's user avatar
  • 750
0 votes
1 answer
28 views

PGFplot - Create a new column from the hash value of another column

I want to calculate the hash value of several columns and store the unique value in another column using pgfplotstable. In my shown MWE I just try this approach with two columns X & Y. I want to ...
PascalS's user avatar
  • 750
0 votes
1 answer
38 views

Easiest way to set the font style for a column in PGFplotstable

My question seems to be very simple but I haven't found a simple solution. I just want to set the j-th column of the table to be typeset in boldface. What is the best and simple way to do that? What ...
Ro Sánchez Martínez's user avatar
0 votes
1 answer
40 views

Problems with currfiledir, pgfplotsstable and compilation from a section file

My project File tree - section - mysection.tex - tools - mystandalone_data.csv - mystandalone.tex main.tex MWE main.tex \documentclass{article} \usepackage[mode=buildmissing]{standalone} \...
Enevevet's user avatar
  • 796
1 vote
0 answers
15 views

saving computed values in a file or table from a foreach loop in a regression plot

I want to save the regression slopes of those data sets for a further table. I manage to add rows in a initial table in the foreach loop but adding the plots doesn't work anymore.... Thanks in advance ...
laurent's user avatar
  • 41
0 votes
1 answer
56 views

How can I create a stacked bar graph for a 5-scale Likert chart for every row in a table?

I want to create a table to represent the response from a survey as 5-scale Likert chart for every question. The table should like as follows. [
MD. Shazibul Islam Shamim's user avatar
1 vote
1 answer
73 views

Create more than one table & tikZ picture out of a single pgfPlot data base

I would like to dynamically create multiple tables & TikZ pictures out of a single pgfPot database. This MWE shows how to generate a single table and TikZ picture out of the given data.csv. The ...
PascalS's user avatar
  • 750
3 votes
1 answer
100 views

Change \includegraphics to a TikZ \pic in \pgfplotstabletypeset

I would like to change the content of my pgf table column "Image" from using an included graphic to a predefined TikZ \pic based on the information in column "Type". The \pic ...
PascalS's user avatar
  • 750
1 vote
1 answer
66 views

Derive table data and TiKz lable from the same data source

I want to combine two of my posts to get a running example for my electrical installation plan in TikZ. In this post, I got the answer how to create a alphanumerical string with fixed length. In this ...
PascalS's user avatar
  • 750
0 votes
1 answer
44 views

How do I get the text for a node from a data column?

I have a table with three columns. I am plotting a dot plot on two of the columns, and I want to sign the points from the top, taking the data from the first column (column with index 0) for the ...
sergiokapone's user avatar
  • 5,598
0 votes
1 answer
38 views

Comments within \pgfplotstableread{...} lead to error

I use the \pgfplotstableread{} command of the pgfplotstable package and manually type in a table. \documentclass{article} \usepackage{pgfplotstable} \begin{document} \pgfplotstableread{ Col1 Col2 ...
babajabba's user avatar
0 votes
0 answers
127 views

PGF addplot3 not working for triangular region of table of x, y, z data

I have a file example.dat that stores x, y, z values. The dimensions of this file are 6000 rows (including the header row) and 3 columns. I am using pgf to generate a surface plot. The MWE is shown ...
Sid's user avatar
  • 1,816
4 votes
2 answers
174 views

Create graph from CSV of percentage figures

I am trying to draw this graph in LaTeX: This is my attempt: \documentclass[12pt,a4paper]{article} \usepackage[margin=2.5cm]{geometry} \usepackage{tikz,pgfplots,pgfplotstable} \pgfplotsset{compat=1....
user avatar
1 vote
1 answer
70 views

Heatmap in Table from green to yellow to red using pgfplots/pgfplotstable

I am currently working my way through one error to another. What I want to create: So in essence a table with color coded cells that gradually fade from red to yellow to dark green. Ideally, in each ...
Alex_qp's user avatar
  • 23
0 votes
0 answers
22 views

Access table data to be used for labels on lines plotted in a \foreach loop

I have a large table which contains multiple sets of (x,y) data, and following each such dataset is a constant number, which we can call "C". To save time I want to utilize a \foreach loop ...
Eirik B's user avatar
  • 85
0 votes
0 answers
26 views

How do I format a range of pgfplotstable columns individually

here How do I format a range of pgfplotstable columns at once? the code is very clever assigning formatting to selected cells. however, I would like to set individual formatting to selected cells, ...
Marcello's user avatar
0 votes
1 answer
51 views

How do you run linear regression on data with nan in the X?

I am trying to use pgfplots to plot a linear regression to my data. If there is a nan in the X component of my data set, no fit is generated, with the warning/s: NOTE: coordinate (nan,0.2) has been ...
KendleMintJed's user avatar
2 votes
0 answers
293 views

Best way to create a table for data in R?

Main question: What is the best way to create a table in a LaTeX document for data from R? At first glance, two possibilities seem conceivable: Let R create the table and "paste" it into ...
user1's user avatar
  • 2,226
0 votes
0 answers
27 views

Interaction between pgfplotstable and a newcommand

I'm trying to generate a big table with informations that are comming from an external csv file that I have generated. I don't really understand what is going on in the following code. I have defined ...
Rhylx's user avatar
  • 3
0 votes
0 answers
11 views

pgfplotstable with bold an repeated headlines and sorting

My problem is similar to that of: Sorting in Pgfplotstable not working but it is not quite answered there. This user wants to sort a table { Matrikelnummer;Note 1010123;1.4 1010121;2.3 1010122;1.1 ...
Fuzzy's user avatar
  • 43
0 votes
0 answers
23 views

Getting the values of pgfplots' \addplot outside of the plot

It is easy to generate plots with some randomness with pgfplots (see code below for a toy example). I would also like to include a table containing the x,y coordinates of the plot in my document, i.e.,...
tosogoso's user avatar
  • 107
3 votes
1 answer
72 views

Plotting inequalities

I'm trying to plot $x<y$ and $2x<y$, but it doesn't work. What I have: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} % Draw axes \draw[->] (-4.1,0) -- (4....
Andersa's user avatar
  • 53
0 votes
1 answer
36 views

Cannot plot CSV with PGFPlotTable, Missing \endcsname inserted

Let's say I have this pretty standard CSV file: id,x0,y,sy,yhat,yerr,yrelerr,ychi2 0,-1,-1.083108355,0.075,-1.013608377,-0.069499978,0.068566894,0.85871057 1,-0.857142857,-0.625857469,0.075,-0....
jlandercy's user avatar
  • 195
1 vote
0 answers
80 views

PGFPlots: Calculating and adding averages to scatter plot

In my source CSV file there is one column per data series, so I use \foreach to iterate over all of them and add them to the scatter plot. I also want to add a TikZ node that marks and states the ...
TexMax's user avatar
  • 113
6 votes
2 answers
244 views

How to overwrite files generated by filecontents environment

I am using latex to generate figures, here is a simple example. \documentclass[ border={0mm 0mm 0mm 0mm}, % left bottom right top ]{standalone} \usepackage{tikz,stackengine} \usepackage{pgfplotstable} ...
wxwuse's user avatar
  • 149
1 vote
1 answer
73 views

Precision in different columns of a Table

I have the MWE in the following, where I build table with 3 columns. The second column are the x-values and third column are the y=f(x) values. The question is the follwing: how can I change the ...
Angelo Aliano Filho's user avatar
0 votes
2 answers
128 views

Problems with large numbers in Tikzmath

I have a MWE as following.I build a matrix whose first column is 1's; second column is the square of each component of x; third column is the cube of the x component, and so on. I need to use tikzmath ...
Angelo Aliano Filho's user avatar
1 vote
1 answer
52 views

PGFplots: Only draw a label for every n-th data point

I've drawn the following graph Using this code: \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{filecontents} \begin{filecontents*}{data.csv} a,b 2019-05,64 2019-...
Luke's user avatar
  • 159
0 votes
1 answer
25 views

pgfplotstable: How to find a row with a value that is lesser or equal to a certain value

I have a pgfplotstable with some values X which are numbered by No. (My X values ​​are descending.) How do I find the number corresponding to the first X value less than or equal to (for example) 10? ...
cis's user avatar
  • 8,912
2 votes
1 answer
87 views

Most of my symbolic x coords not showing up

This one I haven't figured out yet. This is a very basic bar graph, where I have symbolic x coords as the year number I am trying to display. However only the first year is displayed, and it is way ...
Ólafur Víðir Guðbjargarson's user avatar

1
2 3 4 5
23