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
1answer
24 views

pgfplotstable; csv table on multiple sites

I need to import a csv table into latex, which has 280 rows and will be spread out over multiple pages. I tried pgfplotstable and my code looks like this: \begin{table}[!h] \caption{RegressionResults ...
1
vote
1answer
45 views

pgfmath: Integers without zeros, non-integers with zerofill (and fixed)

I want: · integers without zeros, e.g. -2 ---> -2 (not -2.0000) · non-integers with zerofill, e.g. 1.23 ---> 1.2300 e.g. 1.2345 --> 1.2345 Hints: · A pgfmath-solution would be nice (in ...
0
votes
2answers
38 views

pgfplotstable: Newton's Method in pgfplotstable

I use create on use and create col/assign/.code=... to display a Newton's method. The x_{n+1} column is created later as values of the x_n column, so I get an error if I want to have the x_{n+1}-value ...
0
votes
0answers
25 views

Pgfplots polar contour plot from file table with shading

I want to generate a polar plot with a colorbar quite similar to this one: from this question: Rotating polar contour plot messes with alignment of plot and axis I want to use this file with the ...
1
vote
2answers
14 views

Using pgfplotstable and longtable with a .csv

I'm trying to import a .csv while using longtable and pdfplotstabletypeset. I can't get the longtable command to work. \documentclass[12pt,a4paper,oneside]{report} \usepackage{booktabs} \usepackage{...
1
vote
1answer
21 views

Can values be too small/big for pgfplots?

So i've got the following code, in which I want to extraplorate a linear regression line. My attempt was to add \pgfplotstableregressiona*x+\pgfplotstableregressionb as a new plot, but it simply won't ...
0
votes
1answer
34 views

How to put series of small graphics on the graph?

I am making plots with y-axis breaks by placing one \nextgroupplot above the second one. These plots have not only curves but also some additional graphics, which are assigned to bottom coordinate ...
0
votes
0answers
14 views

Percentage sign in .csv with \pgfplotstabletypeset

I'm trying to enter a percentage sign (%) into a table. The table is in a .csv format. Using \% does not work. The problem might be in the document class, but I can't change the document class. The ...
0
votes
1answer
37 views

pgfplot x axis ticks aligned with a matrix beneath |

How can I make something like this as shown in the image using pgfplots in latex. I want the x-axis tick marks aligned with the other texts as shown in the image.
0
votes
0answers
8 views

pgfplotstable: create style by a loop

I used \pgfplotsinvokeforeach{0,2,4}{ \pgfplotstableset{every col no #1/.style={ column type/.add={>{\columncolor{gray}}}{} }, } to get a style for some columns. Since I need this for more complex ...
2
votes
2answers
79 views

pgfplotstable: Highlight rows of a numeric sequence

I would like to highlight the rows n*(n+3)/2 = 0, 2, 5, 9, 14, 20, 27, 35,... How could I automate that best way using the term n*(n+3)/2? \documentclass{standalone} \usepackage{pgfplotstable} \...
1
vote
0answers
27 views

Package pgfplots Error: Could not read table file [closed]

To create a 3d scatterplot, I copied and pasted the code from p.132 of the manual http://ftp.math.purdue.edu/mirrors/ctan.org/graphics/pgf/contrib/pgfplots/doc/pgfplots.pdf, \documentclass{standalone} ...
1
vote
1answer
30 views

Additional vertical space on a table

I use vertical centered table cells and use $\vcenter{\hbox{#1}}$. The result is ok, but: How can I get some additional space here: Please note that this is completely arbitrary table and can change ...
0
votes
1answer
21 views

pgfplotstable: How to use a values from a column in another column

I have X Y 1 a 2 b 5 c I need X Y 1 a=1 2 b=2 5 c=5 How can I get the values of the X-column and use them in the Y-column? \documentclass[]{article} \usepackage{pgfplotstable} \pgfplotsset{compat=...
0
votes
0answers
14 views

pgfplotstable: How to sort at several equal values

I sorted a table by X-values ascending. There are several equal X-values and I need them to be sorted by there corresponding Z-values descending. And maybe ascending Y-values, if X-values are equal ...
0
votes
0answers
22 views

pgfplotstable: How to sort a sorted table

Why is it not possible to use \pgfplotstablesort at a sortet table again? \pgfplotstablesort[sort key=Y, sort cmp=int <]\sorttable{\datatable} \pgfplotstablesort[sort key=X, sort cmp=int <]\...
1
vote
1answer
31 views

pgfplots: How to add steps in xticklabels from table?

I have a plot with too many xticklabels, they overlap side by side. To solve this, I would like to print only each 7th xtick (each week gets one tick.) How can I add a step-logic ti the xtick-labels? ...
1
vote
1answer
15 views

pgfplotstable: Use predefined numbers to access table positions / styles (syntax-problem, bug?)

Why does \def\y{0} \def\x{1} every row no \y column no \x/.style={ /pgfplots/table/@cell content/.add={\cellcolor{pink}}{}, }, not work? \documentclass[]{article} \usepackage{colortbl} \...
1
vote
1answer
51 views

pgfplotstable: How to use the read out row- (column-) value for styles

I want to color a row (column) from a cell with special content, e.g. 'x'. I tried to use every nth row={\rememberrow}{before row=\rowcolor{orange}}, % WORKS NOT! in the solution. \xdef\remembercol{...
0
votes
1answer
53 views

pgfkeys / pgfplotstable: How to get (and save) row- and column-number of a cell with special content

I have a cell with special content, say 'x'. I could find 'x' with string replace. But how can I get and save the row- and the column-number of that cell? With \pgfplotstablerow and \...
3
votes
1answer
80 views

Plot braces between data points named in a pgfplot table

I'm trying to draw brackets between data points with error bars to show significant differences. Here's my current MWE: \documentclass[letterpaper]{scrartcl} \usepackage{tikz,pgfplots} \begin{...
1
vote
0answers
42 views

pgfplotstable: How to highlight row and column of a cell with special content

If I say string replace={x}{\cellcolor{pink}x} a cell with content 'x' gets highlighted. But how to highlight the row and the column of 'x' too? \documentclass[]{article} \usepackage{pgfplotstable} \...
1
vote
1answer
27 views

pgfplotstable: Read out and define colors from table

In a table, the 3rd column indicates a color. \pgfplotstableread[col sep=comma, header=false]{ a, 1, blue b, 2, cyan c, 3, d, 3, e, 5, red f, 6, g, 7, h, 8, i, 9, j, 10, k, 11, yellow }\mydata ...
1
vote
1answer
26 views

Inserting long tables to a document

I am new to LaTeX and I am currently facing a problem of inserting long tables to a document. I have a long table .csv and I wish to insert it in the document with multiple columns and a single table ...
1
vote
1answer
33 views

pgfplotstable wrong cell alignment

The cells and headers in my table are wrongly aligned: the headers are not set left and the last column reaches over the horizontal lines. MWE: \documentclass{article} \usepackage{pgfplots}\...
0
votes
0answers
23 views

Separate bar with same coordinate

I have data from a file with three categories and a value. I want to create a bar chart, where they are grouped by the category "Bereich", while all bars are visible. They should be colored ...
0
votes
1answer
21 views

pgfplotstable: String replace in a table with meta-data from another table (using a foreachloop)

I have a main-table Data.txt with some contents col1, col2, col3 a, b, c x, y, z aaa, abc, xyz where I want to replace some strings. If I say \pgfplotsinvokeforeach{x,y,z}{ \pgfplotstableset{string ...
1
vote
0answers
48 views

PGFPlots surface plot from table with one column for each y value

I have a data table like this: Time,Data1,Data2,Data3,Data4,Data5 0,0,0,0,0,0 0.01001001001001,-4.30013814154693e-05,-3.65528966153454e-05,-5.39214806453237e-05,-5.27331238958749e-05,-4....
0
votes
1answer
18 views

How to skip some particular segments of line graphs in pgfplots (pgfplotstable)

Here is my MWE: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{patterns} \usepackage{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotsset{compat=1.11, width=8cm, ...
0
votes
0answers
30 views

Precision depending on order of magnitude

I have a set of experimental values and I need set up precision for three (or more) range. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{pgfplotstable} \begin{document} \...
0
votes
0answers
19 views

custom xtick labels with pgfplots histogram

I have the following MWE. I am trying to have three xtick labels. The output is shown below. It is missing the xtick label of 8-11 for the column on the right. I would also like to centre the xtick ...
0
votes
0answers
11 views

Sorting one csv file and get data from the second one placed in the right place in pgfplots

I have 2 csv files that looks like this : First one : class,met ABDOMINAL,341 ADVANCED-CAD,556 ALCOHOL-ABUSE,31 Second one : class,met ABDOMINAL,136 ADVANCED-CAD,100 ALCOHOL-ABUSE,13 I currently use ...
1
vote
1answer
47 views

Highlighting maximum value in pgfplotstable works partially

I'm highlighting (bold font) the maximum values with pgfplotstable. It works for all columns, except the last column. In the last column, the last row is always highlighted. I would be very thankful, ...
1
vote
0answers
21 views

How do I convert a pgfplotstable from a macro to plain text for consumption by gnuplot?

I am trying to write a macro for doing quadratic regression in pgfplots. I have \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{gnuplottex} \usepackage{pgfkeys} \...
4
votes
1answer
95 views

Filtering input data as it is read

One thing which is quite tedious with producing pgf plots is preparing or the raw data for pgf. Specifically, making the data set smaller to avoid the memory cap. Generate some dummy data in R: ...
0
votes
1answer
23 views

grid line missing in pgfplotstable and doubly printed labels

In the following document, I have been using the same setup for two diagrams. However, the label "10^1" with its horizontal grid line is only shown in the first diagram. Obviously, this is ...
0
votes
0answers
25 views

Long labels when using pgfplottables

So I got some data that is mostly the same as displayed in the textfile laerebok.txt Label, I ingen eller svært liten grad, I liten grad, I noen grad, I stor grad, I svært stor grad, Ikke ...
0
votes
1answer
43 views

Remove Axis ticks in pgfplot

I use the code below to create a stacked bar chart. The chart is created correctly but I would like to remove the small lines near each label (see in the picture below). I would like to have the ...
0
votes
1answer
25 views

use table data within text and in an axis environment

In a long table they inform me about an experiment with particles, in the first column I have radio data and in the second column, I have energy data. In my document, I need to call randomly some ...
0
votes
0answers
13 views

Plot average of filtered data from table in an automated way

I have a csv table from which I have to plot a subset of data, which is to be filtered according to multiple conditions. To do the filtering I adopt Jake's solution. Other than the filtered data, I ...
1
vote
2answers
33 views

PGF: X-axis label doesn't show for second plot

I produce the following chart: If you look in the table \hchartone, you'll see that I created two separate series (yoy and yoy2) in order to be able to plot the last bar in a different colour. ...
2
votes
1answer
108 views

Axis' discontinuity, value randomization and linear regression for log based Arrhenius plot

So I am attempting to create some simple sudo random data and plot the results with a trend line. Best fit linear approximation. I am trying to create something that looks like the graph below Here ...
2
votes
1answer
25 views

Adjust the individual position of the labels on the chart

I'm trying to adjust the label position, but that seems to be fixed. What's wrong? \documentclass{standalone} \usepackage{pgfplotstable} \usepackage{pgfplots} \pgfplotsset{compat=newest} \...
0
votes
0answers
59 views

How to allow non-unique column names in PgfPlotsTable?

I have been struggling with PgfPlotsTable for a while. Problem is that I cannot get rid of '-indexNum' appended at the end of my column names. Does anyone know if there's an option to have non-unique ...
1
vote
1answer
55 views

Fitting an exponential function

I want to graph a part of y = e^{\sqrt{x}} for x up to 10^5. I wrote down the following: \begin{tikzpicture}[scale=0.8, samples=200] \draw [thick, <->] (0,5) -- (0,0) -- (8,0); \node [below ...
2
votes
1answer
23 views

Looping over table elements with pgfplots (beamer)?

I am working in beamer with pgfplotstable. I want to produce the following: \documentclass{beamer} \usepackage{tikz,pgfplots,pgfplotstable,filecontents} \pgfplotsset{compat=newest} \...
1
vote
0answers
19 views

Using pgfplotstable to convert a .csv to a table but doesn't like the ∞ symbol

Here's my .tex code: \documentclass{article} \usepackage{amsmath} % allows use of numberless equation* package \usepackage{fullpage} % uses more of the page \usepackage{graphicx} % allows use of ...
2
votes
2answers
105 views

Get value of a row in pgfplotstable, which is x rows above current row

I'd like to do a calculation to plot a graph. But I can't find a way to get the value of a certain row of a certain column in a loaded data file. How do you get the value of a cell let's say 14 rows ...
1
vote
2answers
134 views

How to create pgfplotstable confusion matrix?

How to create pgfplotstable confusion matrix ? Situation I want to create a confusion matrix (for example like this), reading data from a file and displaying it flexibly. Moreover, I found these two:...
0
votes
2answers
54 views

Siunitx “duplicate-exponent-token” error in latex

\begin{table}[ht] \centering \caption{Evaluation of the proposed } \label{tab:Comput} \setlength{\tabcolsep}{0pt} \sisetup{round-mode=places, round-precision=2, table-...

1
2 3 4 5
20