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
4 votes
1 answer
2k views

Long table and pgfplotstable with multiple data files

I have two csv files: namespgf.csv Sl. No., Reg. No.,Name,Category,Group,Gate,Sponsored,Department 1,MS001,Ajay-D-Vimal Raj P,PY,OBC,--,No,Physics 2,MS002,Harish Kumar,PY,GE,GATE,Yes,Physics 3,MS003,...
user avatar
2 votes
1 answer
1k views

Create a ybar interval from given bar widths

I am collecting data using the NASA Task Load Index, which gives 6 scales and has a weight associated with each scale. I am trying to plot the mean value for each scale using a ybar interval graph, ...
ThomasH's user avatar
  • 942
10 votes
1 answer
3k views

Calculate and draw difference of two plots automatically

I'm trying to automatically generate a plot, which visualizes the difference of two other plots. The input source is a single(!) file. The data is filtered by one column with /tr/rowfilter. Here is an ...
Thomas Rebele's user avatar
12 votes
1 answer
8k views

Create a contingency table using pgfplotstable

I'm trying to create a general pgfplotstable style for displaying contingency tables (the below example is taken from Wikipedia) of any sort but I am having trouble computing the totals for each row ...
ThomasH's user avatar
  • 942
8 votes
1 answer
1k views

Aligned pgfplots in beamer frames

I would like to reproduce the design represented in the following picture with Beamer an Pgfplots. Namely, I want the size of plotting area to be always the same size and have the same position ...
M. Toya's user avatar
  • 3,177
6 votes
1 answer
382 views

IfDecimal in pgfplotstable

I try to calculate the values of a new column errorxin a pgfplotstable on the fly with \pgfplotstableset{create on use... based on the colums error1 and error2 as error1 - error2. This works fine, if ...
Andreas's user avatar
  • 521
15 votes
1 answer
3k views

Plot x y data from different files/tables [duplicate]

I have two data files (xxxx.txt and yyyy.txt), each only containing one column of x and y data respectively. Now I want to plot these two data together in a simple 2D diagram. Has anybody an idea how ...
David K.'s user avatar
  • 613
7 votes
1 answer
1k views

PGFPlot two \pgfplotstableregressiona

Hi i have two plot with two linear regression but the legend show the same equation for the straight line... I haven't made a MWE because I thought it isn't needed---Is it? \pgfplotstableread{ X Y 97 ...
Aurelius's user avatar
  • 7,563
2 votes
1 answer
1k views

How can I add another plot to the \addplot command in PGFPlots?

My goal is to add another plot to the \addplot command and this small example hopefully shows what I'm trying to do: \documentclass{standalone} \usepackage{pgfplotstable} \begin{document} \...
Sean Farley's user avatar
19 votes
1 answer
6k views

How to use a string column with pgfplotstable to label datapoints in a pgfplot?

I have a comma-separated list of data points. They should be plotted as a scatter plot, and should be labeled using data from the .csv file. Having specified the first column of my file as string type,...
Ingo's user avatar
  • 19.6k
6 votes
1 answer
1k views

Using value of a table as color indicator for \addplot like a colormap

I am trying to use a relative value (percentage) extracted of a table to define the color of several 2D plots like this: At the moment I'm using addplot[mesh] together with a self defined colormap ...
kromuchi's user avatar
  • 2,157
7 votes
1 answer
2k views

Pgfplots remove darker borders on marks

Hi is possible remove the darker borders on marks indicated from the arrow ? Thanks \documentclass[a4paper,12pt]{article} \usepackage{pgfplots,pgfplotstable} % Grafici \pgfplotsset{/pgf/...
Aurelius's user avatar
  • 7,563
10 votes
2 answers
1k views

PGFPlots colored regression legend

how can i have this legend? in this plot: \documentclass[a4paper,12pt]{article} \usepackage{pgfplots,pgfplotstable} % Grafici \pgfplotsset{/pgf/number format/use comma,compat=newest,% ...
Aurelius's user avatar
  • 7,563
1 vote
1 answer
273 views

PGFPlots: strange behaviour

Look at the differences between the following two plots. I would like to have in plot "1" the same distances between the colorbar, axis labels and the ticks labels that I get in plot "2". How can ...
Aurelius's user avatar
  • 7,563
3 votes
1 answer
572 views

PGFPlots staggered axis

Why in this plot the axis are all staggered ? \documentclass[12pt,% % corpo del font principale a4paper,% % carta A4 % ...
Aurelius's user avatar
  • 7,563
5 votes
1 answer
4k views

Distance of the axis labels Pgfplots

Why this options change the distance of the axis labels in this plot ? \pgfplotsset{/pgf/number format/use comma,compat=newest,% width=12cm,% height=9cm% ...
Aurelius's user avatar
  • 7,563
3 votes
1 answer
2k views

Pgfplots two datatable in the same document

\documentclass[a4paper,12pt]{article} \usepackage{pgfplots,pgfplotstable} % Grafici \pgfplotsset{/pgf/number format/use comma,compat=newest} %***************************************...
Aurelius's user avatar
  • 7,563
5 votes
1 answer
2k views

Dates as xticklabels ; number formated dates provided

I would like to plot temporal data and have dates as tick labels. I have seen chapter 4.20 Symbolic Coordinates and User Transformations from pgfplots manual but it does not correspond to my situation ...
M. Toya's user avatar
  • 3,177
38 votes
4 answers
56k views

Convert numpy array into tabular

I am doing some data analysis in python, putting the results in form of a matrix stored into a numpy array. I would like to put this results into a report and the best way would be to put a table with ...
user11170's user avatar
  • 483
6 votes
1 answer
1k views

How can LaTeX code in a data file be read by pgfplotstable?

I would like to place some LaTeX math code in the columns of a file to be read by pgfplotstable. Unlike How to use underscores with pgfplotstable?, I would like the columns to be formatted so LaTeX ...
sappjw's user avatar
  • 1,004
6 votes
1 answer
3k views

How can multiple pgfplotstable columns be used in a legend?

I'd like to plot a few sets of data using the groupplots library of pgfplots. On each plot, I'd like to add a few other pieces of data that do not change from plot to plot. So I put the plot ...
sappjw's user avatar
  • 1,004
7 votes
3 answers
3k views

How to use underscores with pgfplotstable?

I have an input file like this: some_entry 123 another_entry 456 yet_another_entry 789 and I want to typeset it as a table with: \pgfplotstabletypeset[col sep=space]{FILENAME} Problem is that ...
Fabian's user avatar
  • 799
8 votes
1 answer
2k views

Is it possible to create a table and bar chart on the fly?

I am a beginner in Latex, using it tentatively for industrial documents. I have reached a point where the anticipated benefits from using it in a Corporate environment appear to me very significant. I ...
Yves's user avatar
  • 2,815
3 votes
1 answer
1k views

PgfplotsTable: How to merge cell contents of two tables to one table?

I have two tables (sorry, inline tables are not working with pgfplotstable 2011/12/19 on my system, even with the option format=inline): Data table (data.csv): X,A,B U,1.1,1.2 V,2.1,2.2 ...
bonanza's user avatar
  • 33
7 votes
1 answer
2k views

Usage of longtable (or equivalent) and pgfplotstabletypeset

I'm a new user of TikZ pgfplots and pgfplotstable and have been stoked to discover how easy it is to go between Matlab (via matlab2tikz and writing to CSV) and LaTeX. I'm getting a little more ...
Andrew's user avatar
  • 71
50 votes
3 answers
16k views

Drawing heatmaps using TikZ

Introduction I want to create a heatmap using TikZ. You can see the basic idea in the picture below: I basically have a table of values and each value is assigned a color. The picture is the result ...
Manuel's user avatar
  • 687
5 votes
2 answers
2k views

Pgfplots \closedcycle introduces unwanted slope

I'm trying to plot two graphs with the area between them filled. This works fine, except for the fact that the \closedcycle does not go down vertically, but rather at some (arbitrary?) slope, circled ...
Psirus's user avatar
  • 5,735
1 vote
0 answers
107 views

Scope issues with pgfplotstable [closed]

I created a command that creates a table and do some computations on it. And I would like to use this command several times. \documentclass{minimal} \usepackage{pgfplotstable} \pgfplotstableset{% ...
mikael-s's user avatar
  • 375
14 votes
2 answers
2k views

pgfplotstable or datatool?

What are differences, which to use for including .csv, .tsv files ? Datatool ? pgfplotstable ? I've seen at question : How typeset a numeric table from a CSV file how person asked about fixing ...
Grzegorz Wierzowiecki's user avatar
16 votes
1 answer
3k views

Selecting rows to be displayed with pgfplotstable

I have a table, read from a file, and I would like to display only rows which have a specific value in a given column. Here is an ECM: \documentclass{minimal} \usepackage{pgfplotstable} \begin{...
mikael-s's user avatar
  • 375
2 votes
0 answers
1k views

Highlight min/max of value pairs on each row with pgfplotstable [closed]

I would like to highlight the min/max value in pairs of values on each row in a table with pgfplotstable. I had a look at Highlighting Extremal Values in Table which seems to provide much of the ...
Lars's user avatar
  • 21
13 votes
1 answer
3k views

pgfplots: How to ignore the last line of a data file?

I need to plot data files which contain a comment in the last line, like this: 0 2 4 1 5 7 2 9 5 3 11 15 4 10 15 THIS WAS: TOTAL Now, pgfplots seems to have a problem with that giving me ...
Philipp's user avatar
  • 3,795
15 votes
1 answer
5k views

Table typesetting with pgfplotstable

I have two questions concerning pgfplotstable and number formatting with pgf. Consider the following piece of code: \documentclass{article} \usepackage{pgfplotstable} \usepackage{amsmath} \begin{...
user8947's user avatar
  • 277
13 votes
1 answer
5k views

Import files with pgfplotstable and split tables across multiple pages

I am using pgfplotstable to import files with many rows and columns with which to create custom tables. Some tables are quite long, covering many pages. Is there a way to automatically assign the ...
zun's user avatar
  • 814
8 votes
2 answers
2k views

Change \pgfplotstabletypeset font size

I have a table with strings and fixed numbers. I need to set \footnotesize only to typeset it using \pgfplotstabletypeset. How can I change font size ?
Fernando Nadal's user avatar
4 votes
1 answer
2k views

Multiline table header

Is it possible typeset a table with \pgfplotstabletypeset and change the style of 1 column header to be multiline? This code doesn't work and can't compile: ... columns/errorRelC/.style={ column ...
Fernando Nadal's user avatar
26 votes
4 answers
17k views

Image with axis

I need to plot some data in a file (10000 records of 2 points each one) but PGFPlots is very very slow rendering it. So I'm trying to use MatLab to plot the data, capture the image without axis and in ...
Fernando Nadal's user avatar
12 votes
1 answer
3k views

Stacked barplots/groupplots with text labels in x-coordinate

I was trying to stack a groupplot, or was it grouping a stacked plot? However I was trying to get something like: The ybar stacked option works quite nice here. But when I try to adapt it to a ...
Lorzen's user avatar
  • 1,191
18 votes
3 answers
20k views

pgfplots multiple plots in one file

In pgfplots is it possible to have several plots in one datafile? The goal is to add about 20 plots, which has different number of points and not the same x-value, to the same axis. (app. 350 points) ...
hpekristiansen's user avatar
10 votes
2 answers
5k views

Remove rows in a \addplot table command

Is there any way to adapt Show last N rows from input datafile only in \pgfplotstabletypeset to a \addplot table command ? This doesn't work: \documentclass{article} \usepackage{pgfplots} \...
Fernando Nadal's user avatar
25 votes
2 answers
4k views

Highlighting Extremal Values in Table

In a table generated by pgfplotstable, how can I highlight for each column or row the cell with the minimum value (e. g. displaying the corresponding entry in bold face)? Example:
Stephan's user avatar
  • 261
4 votes
1 answer
2k views

Show last N rows from input datafile only in \pgfplotstabletypeset

I would like to limit the rows in \pgfplotstabletypeset to the last N rows. I can skip rows by doing this: \pgfplotstabletypeset[skip rows between index={0}{4}]{file.data} But this only works if I ...
Fladi's user avatar
  • 371
3 votes
1 answer
2k views

How to get the domain for the line of best fit w/pgfplots to be all real numbers?

Although I already worked around this problem by finding the x-intercept with the linear regression equation I calculated w/gnuplot, I'm still curious to know how pgfplots can do it without me ...
Miriam's user avatar
  • 1,703
9 votes
2 answers
5k views

Fill area of curve above a line using pgfplots

This question is related to Fill between two curves in pgfplots. which started me of. However, I need to have just the area above the reference line filled. \begin{tikzpicture} \pgfplotstableread{...
ThijsMuis's user avatar
6 votes
1 answer
2k views

Find a extremal value in external data file with pgfplot

Basically I'm plotting many curves stacked one after the other in pseudo 3D to show transient behaviors. I need every x axis to be at the same place so I use a ymin and ymax optional entry for the ...
ben paillard's user avatar
7 votes
2 answers
4k views

skipping the first line of a data file for pgfplotstable

I need to skip the first row of a csv file, which is auto-generated by some magic measurement apparatus. It contains its own filename as the first line. The second line contains the column names (no ...
Christoph's user avatar
  • 2,903
7 votes
1 answer
1k views

Horizontal table with pgfplotstable

How can I make table in pgfplotstable table form input file A B 1.0 20 1.1 21 1.2 22 1.3 23 1.4 24 looks like this one: I trying to use \pgfplotstabletranspose\loadedtable{input.dat} \...
Molurd's user avatar
  • 167
6 votes
2 answers
879 views

Rearrange data in pgfplotstable

I have a \pgfplotstable with data (loaded from a file) like this one: \pgfplotstableread{ s f 0.0 95.9638 0.2380665 160.565 0.511 190.435 0.705 270.435 1.0 455....
Fernando Nadal's user avatar
7 votes
1 answer
2k views

Add rows to a pgftable

I need to add a custom row of data to a \pgfplotstable for drawing purposes. The commented line is the needed data. I can read and manipulate any element from table but I can't add any row. Any advice ...
Fernando Nadal's user avatar
7 votes
1 answer
1k views

Pointing from Data in a pgfplotstable to a pgfplot

Are there PGF coordinates available for elements in a pgfplots table? Groupplots allow to address plots via (group c2r1.center) (column 2, row1). \pgfplotstabletypeset[col sep=&,row sep=\\,sci ...
Christoph's user avatar
  • 361