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
0answers
31 views

add time to x-axis with date in pgfplot

In my MWE I have date and time separated in my .csv file to set both their own respective column in the table. Now I want to plot the same date, but I don't know how to add the time except writing a ...
1
vote
1answer
18 views

latex sidewaystable, pgfplotstable produces unwanted c's in first cell

I'm getting a bunch of c's in the first cell of my table. The cell is blank in the .csv file. I'm not sure why and I can't figure out how to remove the c's. They are not in the .csv file. I think it ...
2
votes
2answers
33 views

Using \csname to iterate over loaded pgfplots tables with \addplot

I'm attempting to create a pgfplots group plot in which each curve is made from a pre-loaded pgfplots table in an automated way. The intended application is for a complicated drawing involving many ...
1
vote
1answer
15 views

Refer to a loaded pgfplotstable via csname

I would like to be able to use \csname to manipulate a table previously assigned to a macro via \pgfplotstableread. Attempting to use the macro indirectly, however, fails to compile. Here is a MWE: \...
1
vote
1answer
26 views

Nested groupplot (one little groupplot inside a “main” groupplots) [duplicate]

Is it possible to have a smaller plot embedded into one of the plots of a groupplot? What I would like to achieve is like a magnified region of the lower plot, it should display two rectangles, one ...
0
votes
0answers
17 views

How to let a bar chart start from value different to zero with pgfplots [duplicate]

Following up on a previous question. How do I let a bar chart start from a value different to zero? Including negative numbers. As you can see when I plot the data from the table all bars start at ...
0
votes
1answer
53 views

How to force scientific notation on top of the plot

I'm dealing with a bunch of plots and groupplots, and sometimes something weird happens. I'm plotting from data tables and when it comes to decide the y tick distance, sometimes the scientific ...
0
votes
0answers
45 views

Pgfplots and Groupplot: Legend Management

I have the following MWE: \documentclass{article} \usepackage[dvipsnames]{xcolor} \usepackage{pgf,pgfplots,pgfplotstable} \pgfplotsset{compat=newest} \usepgfplotslibrary{colormaps} \usepgfplotslibrary{...
3
votes
1answer
32 views

Error in pgfplots foreach syntax column index

I am using Texmaker. What's wrong with "x index = \t+1"? \documentclass[border=5pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.17} \usepackage{filecontents} \begin{document} \...
2
votes
1answer
32 views

Align numbers in siunitx Table with defined Column Width

I have an issue in correctly changing the column width of a table. I want the columns to be formatted using the siunitx package. In my data, I have a mix of values that should be printed as is (e.g. 0....
1
vote
1answer
28 views

Decreasing or minimizing the row height / padding of a .csv table that uses pdfplotstable and tabu

Please let me know if the code and explanation I'm providing are insufficient; I'll gladly add what I can if it helps. Background: I'm using LaTex (specifically Overleaf running the XeLaTeX engine) to ...
2
votes
1answer
21 views

pgfplotstable: fixed zerofill prints some numbers in scientific format

I have a table with decimal numbers in the columns. I want to show exactly two decimal places without scientific notation, however when I added fixed zerofill=true it works for all values except very ...
1
vote
0answers
23 views

pgfplotstable: color from cellentry ##1 [duplicate]

If I have a column with entries like 0,0,red,0,green,0,0,0,brown,0,0,0,..., why does this not work: postproc cell content/.code={ \ifnum##1=0 \else @cell content={cellcolor{##1}{##1}} \fi}, ...
1
vote
0answers
30 views

Make GetMean ignore nan values and different column length

I want to calc means of datafiles within pgfplots and this is a very nice answer by Gonzalo Medina. However may use case is just slightly more complicated as I have: multiple columns in my file and ...
0
votes
1answer
32 views

pgfplotstable: string replace when formatting with 'postproc cell content' does not work

It seems, that string replace={XXX}{replaced} does not work, if I use postproc cell content/.style={...}. What can I do? \documentclass[a4paper]{article} \usepackage{colortbl} \usepackage{...
1
vote
2answers
38 views

writeout collapses with pgfmathprintnumber

% Density Show Test \pgfmathdeclarefunction{DensityShowTest}{2}{% \pgfmathparse{dim("#1")==3}% \ifnum\pgfmathresult=1% \pgfmathparse{1000*#2}% \pgfmathparse{"\pgfmathprintnumber[...
0
votes
1answer
25 views

Read out (and edit) data from a table with def, xdef, let etc. (by using a pgf-loop and pgfplotstable)

If I read out from a table with \def, say \pgfplotstablegetelem{\row}{No}\of{\mytable} \def\No{\pgfplotsretval} it becomes wrong. By using \xdef \pgfplotstablegetelem{\row}{No}\of{\mytable} \xdef\No{\...
3
votes
3answers
92 views

newwrite out of a table with umlauts

I have a follow-up question on https://tex.stackexchange.com/a/598981/46023 Everything works in the MWE there, but when used in my original example it no longer works (note: originaltable.csv is a ...
0
votes
1answer
31 views

Pgfplotstable with custom header in first column

I have the following document \documentclass{standalone} \usepackage{pgfplotstable} \usepackage{booktabs} \begin{document} \pgfplotstableread{ 1 55.00 2 5.00 13 5.00 14 5.00 15 5....
0
votes
0answers
15 views

How to use latexdiff with pgfplotstableread

Is it possible to use latexdiff when including data through pgfplotstable::\pgfplotstableread? From pgfplotstabletypeset not opening csv file when using latexdiff I changed my files to wrapping the \...
1
vote
1answer
32 views

Ommiting a row when boxplotting

I have a file that looks like this: 1 0.237340 0.135170 0.339511 0.237653 0.135482 0.339823 2 0.561320 0.422007 0.700633 0.165871 0.026558 0....
0
votes
1answer
51 views

Place the data of the periodic table excerpt correctly in a TikZ matrix

I have a small excerpt from a periodic table. Now I want to place the symbols (2nd column) correctly in a TikZ matrix with 8 rows and 18 columns; where unoccupied cells should remain empty. For what I ...
1
vote
1answer
26 views

Read in datas of the Periodic Table of Elements (pgfplotstable)

I tried to open https://gist.github.com/robertwb/22aa4dbfb6bcecd94f2176caa912b952 (see above) with pgfplotstable. But I get several errors and warnings: Package pgfplots Error: Table 'Periodic Table ...
0
votes
1answer
52 views

How to plot the derivative of a function in Tikz that is given via data

Assume we have a data data.csv of a function in the form of two columns: x and f(x), e.g., x f 0 3 0.25 2 0.5 2 0.75 0 1 1 The by default representation of it via \addplot in TikZ is given as a ...
3
votes
1answer
61 views

Plot above matrix

I need Help ! I need to add the yellow dot with arrow. In my model If possible something like coordinates so that in the future you can move the point from place \documentclass{article} \usepackage{...
2
votes
2answers
32 views

Put a line separator between specific cells in a pgfplotstable

I have a pgfplotstable with a CSV data source. Here's my current code: \documentclass[12pt]{report} \usepackage{pgfplotstable} \begin{document} \begin{table} \centering \...
1
vote
2answers
44 views

Creating a distance table (staircase table)

Is there a way to automate the creation of a distance table as such? E.g., the folowing table expresses how far towns are from each other, therefore I'm not interested in the distance of a town with ...
0
votes
1answer
38 views

pgfplot log mode and rescale

I want to specify the following x positions on the x-axis: 0.01, 0.02, 0.04, 0.08, 0.16, 0.32. I try to use xmode = log, but failed to find a suitable base. As shown in the image below, currently, the ...
1
vote
1answer
35 views

pgfplotstable - siunitx error with data from csv with values in scientific notation

I want to create table using pgfplotstable with data from csv file with values in scientific notation, but when i try to compile the file to pdf I end up with following siunitx errors Package siunitx: ...
1
vote
1answer
22 views

pgfplots virtual columns based on row value

I'm currently using the pgfplots package to render tables from .csv files. The files are generated automatically. I often use tables as follows: \documentclass[tikz]{standalone} \usepackage{pgfplots} \...
0
votes
2answers
60 views

how can shading rows in table

I wanted to do shading in a table according to its rows. For example, if you see the table below: a b c d a 90 10 0 0 b 0 80 10 10 c 0 0 95 5 d 0 10 5 85 I want to shade ...
2
votes
1answer
60 views

uniform colormap

I plot the contour of an exemplary xyz matrix. \documentclass[border=5pt]{standalone} \usepackage{pgfplots} \usepackage{filecontents} \pgfplotsset{compat=newest} \usepgfplotslibrary{colormaps} \...
1
vote
1answer
41 views

PGFplotstable: Postprocessing Chemical Formulae

I have a csv file with four columns Species; Phase; Chemical formula; Delta f H which I'm trying to load into a table using pgfplotstable. When I use this code \documentclass[margin=2pt,12pt]{...
0
votes
0answers
26 views

multiple graphs with txt files in pgf plot

hello could you help me? How can I make a graph like the one in the image, but using .txt files not data tables.
1
vote
1answer
30 views

Vertical Rule in PGF Plottable

I just learned to plot tables with pgfplottables and it feels very nice and smooth. Here is my Code example: \documentclass[14pt]{book} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{...
1
vote
0answers
22 views

LaTeX commands in pgfplots legend entries from csv import

I am trying to import data from a csv file, where legend entries are automatically taken from the csv file's header. Those legend entries contain LaTeX math code. % used PGFPlots v1.16 \documentclass[...
0
votes
1answer
61 views

pgf error maths

help me please: I don't understand why pgf show me this error, for all my dates: Package PGF Math Error: Could not parse input '14.099117,3.068e+6,' as a floating point number, sorry. The unreadable ...
1
vote
0answers
56 views

Figures generated with pgfplots and includestandalone do not have the same size, even though the scaling is equal

In my project I have several graphs/figures displaying data. The requirements I got are to use the same font in the text of the main document and in all figures. Therefore, I decided to use pgfplots/...
0
votes
0answers
23 views

Set labelsize of tikz/pgfplots-figure to fixed font size independently of scaling factor

In my project I have several graphs/figures displaying data. The requirements I got are to use the same font in the text of the main document and in all figures. Therefore, I decided to use pgfplots/...
1
vote
0answers
45 views

Wrong pgfplots linear regression computing

I'm try to plot the following data: \pgfplotstableread[col sep=semicolon]{ record;value 2004;48 2009;34 2010;32 2016;22 2020;21 }\valuetotest by \pgfkeys{ /pgf/number format/.cd, set decimal ...
0
votes
0answers
13 views

pgfsplotstable: how to format _some_ column headers

I would like to rotate the headers of some columns in my pgfboxtable. The closest I've gotten is \pgfplotstabletypeset [assign column name/.style={ /pgfplots/table/column name={\rotatebox{...
0
votes
0answers
46 views

How to read a latex table with pgfplotstableread with \begin{table} \etc

I would like to read data from a .tex file using \pgfplotstableread. The .tex file contains table with \begin etc. tags and I am asking for a clean way to strip this. I can skip the first lines but ...
0
votes
0answers
17 views

pgfplotstable: apply a macro to an entire column

I recently discovered pgfplotstable. It seems to have very powerful tools for data manipulation. One of the most remarkable options I've seen is the option of creating columns based on the data of ...
1
vote
1answer
38 views

PGFplotstable: Skip rows containing nan

Forgive me, but I have not been able to find an answer. I have some text-files organized like the one below, which I typeset into a table using pgfplotstable \documentclass[border=1pt]{standalone} \...
0
votes
0answers
30 views

Bar chart with different 1 and 2 bars per group

I am trying to create a bar chart that has both groups of 2 bars and a single bar. When I run my code below, the x-axis ticker for the the single bars does not show. Is bar group size={0}{1} not ...
1
vote
0answers
159 views

How to add line numbers to a PDF?

I am trying to add line numbers to a PDF of a thousand pages. I only have the PDF and don't have the source text that was used to generate the PDF. As part of my research, I have reviewed the ...
0
votes
1answer
59 views

'Continued on next page' for longtable out of csvreader

I have successful managed (with help from this forum) to display my options in a table with each line numbered and price displayed. \csvreader[longtable= >{\stepcounter{RowNum}\theRowNum}r >{\...
0
votes
1answer
32 views

Endless compilation loop with pgfplotstable

I`m tring to compile se following document: \documentclass{standalone} \usepackage{pgfplotstable} \usepackage{booktabs} \begin{document} \pgfplotstabletypeset [ every head ...
1
vote
1answer
56 views

annotation on pgfplot table

In this example table, how can I draw a line from (1,2) to (4,2)? \documentclass{standalone} \usepackage{filecontents} \begin{filecontents}{data.dat} C1 C2 6 80 15 520 ...
2
votes
1answer
35 views

Why does my plot made by 'pgfplots' come out empty?

Here is my code - \usepackage{pgfplots} \usepackage{filecontents} \usepackage{graphicx} \usepackage{siunitx} \usepackage{tikz} \begin{figure}[h!] \begin{center} \begin{tikzpicture} \begin{...

1
2 3 4 5
21