PGFPLOTS Tables: Read, Typeset, Compute Columns, and Plot Data (Unlocking LaTeX Graphics, Ep. 61)

In this episode of Unlocking LaTeX Graphics, applied mathematician Tammy Kolda demonstrates how to use the PGFPLOTS table package to read, display, manipulate, and plot tabular data directly in LaTeX. She shows how to load data from an external file with \pgfplotstableread, display it as a formatted table with \pgfplotstabletypeset, and reuse the stored table for multiple plots. She demonstrates computing new values on the fly using x and y expressions in \addplot, pulling string-based tick labels from a table column, and adding computed columns with \pgfplotstablecreatecol. Finally, she creates a table from scratch with \pgfplotstablenew and plots the results. 00:00 Welcome and Introduction 00:59 Document Setup 01:40 Our Data File 02:00 Setup for Plotting 03:22 Simple Scatter Plot 04:11 Reading a Table from a File 04:35 Displaying a Table 05:33 Reusing a Table 05:52 Computed X- and Y-Values in a Plot 07:22 Reading Tick Labels from Table 08:27 Adding a New Column to a Table 10:23 Creating a Table from Scratch 12:20 Thanks for Watching Key terms: texlatex, PGFPLOTS, pgfplotstable, scatter plot, BMI, LaTeX tables, pgfplotstableread, pgfplotstabletypeset, addplot, x/y expressions, string-based tick labels, pgfplotstablecreatecol, column typing, pgfplotstablenew Related Episodes Working with data files in PGFPLOTS:    • Working with Data Files in PGFPLOTS (Unloc...   Scatter plots with PGFPLOTS:    • Scatterplots with PGFPLOTS in LaTeX (Unloc...   Mastering addplot in PGFPLOTS:    • Mastering Addplot in PGFPLOTS (Unlocking L...   Although only indirectly related, this is the second episode in a series on slope fields. The first episode, which focuses on plotting slope fields with PGFPLOTS, is available here:    • Plotting a Slope Field with TikZ (Unlockin...   Today's Document on Overleaf: https://www.overleaf.com/read/fcdnhhp... Unlocking LaTeX Graphics Book: https://latex-graphics.com Purchase Book on Amazon: https://amzn.to/3z76nwb