How I make beautiful GRAPHS and PLOTS using LaTeX @DrTrefor
How I make beautiful GRAPHS and PLOTS using LaTeX  @DrTrefor
Uploaded May 2022 | Updated November 2026, 3 hours ago
Get started with LaTeX using Overleaf: ► overleaf.com/?utm_source=yt&utm_medium=link&utm_campaign=im22tb. My thanks to Overleaf for sponsoring today's video.

Check out the previous videos in my LaTeX playlist:
►youtube.com/playlist?list=PLHXZ9OQGMqxcWWkx2DMnQmj5os2X5ZR73

I make most of my graph and plots inside of LaTeX using a package called pgfplots. LaTeX is a type setting language and I like using it for graphs specifically because I can control all aspects of my graphs very precisely, with formatting native and easily adjustable with the rest of my document, with syntax similar to the syntax of the rest of LaTeX that I use all the time, and best of all it is free and will remain readily available. In this video we will see how to do 2D graphs, scatter plots, bar charts, 3D surface plots and 3D line plots, as well as how to format all aspects of our plots and axes.

♡♡♡SUPPORT THE CHANNEL♡♡♡
►Support on PATREON: patreon.com/DrTrefor
►MATH BOOKS I LOVE (affiliate link): amazon.com/shop/treforbazett
►CURIOSITY BOX: CuriosityBox.com/DrTrefor use CODE drtrefor for 25% off awesome STEM merch boxes

0:00 Why I use LaTeX and pgfplots for plots and graphs
1:17 Why I use Overleaf as my LaTeX editor
2:00 The simplest 2D plot
3:57 Adjusting the preamble
4:49 Customizing plot color, style, marks, samples
6:25 Adjusting axis bounds, placement, labels and title
9:04 Plot domain
9:45 2nd example: ticks, tick labels, grid lines
13:51 Adding text nodes
15:18 3rd example: Scatter plot with imported data
18:38 4th example: color coded scatter plot
20:16 5th example: stacked bar chart
21:23 Version history in overleaf
22:00 6th example: 3D surface and mesh plots
25:47 7th example: 3D curve plot

The full documention for pgfplots (it's long!) is here: iro.umontreal.ca/~simardr/pgfplots.pdf

COURSE PLAYLISTS:
►DISCRETE MATH: youtube.com/playlist?list=PLHXZ9OQGMqxersk8fUxiUMSIx0DBqsKZS
►LINEAR ALGEBRA: youtube.com/playlist?list=PLHXZ9OQGMqxfUl0tcqPNTJsb7R6BqSLo6
►CALCULUS I: youtube.com/playlist?list=PLHXZ9OQGMqxfT9RMcReZ4WcoVILP4k6-m
►CALCULUS II: youtube.com/playlist?list=PLHXZ9OQGMqxc4ySKTIW19TLrT91Ik9M4n
►MULTIVARIABLE CALCULUS (Calc III): youtube.com/playlist?list=PLHXZ9OQGMqxc_CvEy7xBKRQr6I214QJcd
►VECTOR CALCULUS (Calc IV): youtube.com/playlist?list=PLHXZ9OQGMqxfW0GMqeUE1bLKaYor6kbHa
►DIFFERENTIAL EQUATIONS: youtube.com/playlist?list=PLHXZ9OQGMqxde-SlgmWlCmNHroIWtujBw
►LAPLACE TRANSFORM: youtube.com/playlist?list=PLHXZ9OQGMqxcJXnLr08cyNaup4RDsbAl1
►GAME THEORY: youtube.com/playlist?list=PLHXZ9OQGMqxdzD8KpTHz6_gsw9pPxRFlX

OTHER PLAYLISTS:
►Cool Math Series:
youtube.com/playlist?list=PLHXZ9OQGMqxelE_9RzwJ-cqfUtaFBpiho
►Learning Math Series:
youtube.com/watch?v=LPH2lqis3D0&list=PLHXZ9OQGMqxfSkRtlL5KPq6JqMNTh_MBw
►LaTeX: youtube.com/watch?v=-HvRvBjBAvg&list=PLHXZ9OQGMqxcWWkx2DMnQmj5os2X5ZR73&index=2&ab_channel=Dr.TreforBazett

SOCIALS:
►X/Twitter: http://X.com/treforbazett
►TikTok: tiktok.com/@drtrefor
►Instagram (photography based): instagram.com/treforphotography
How I make beautiful GRAPHS and PLOTS using LaTeXBeyond the Binomial Theorem: The Binomial SeriesUnboxing the worlds most prestigious CHALKHow to make your LaTeX documents BEAUTIFUL // LaTeX TutorialThis integral is ridiculous.Separation of Variables //  Differential EquationsThe Theory of Higher Order Differential EquationsDeriving Gausss Law for Electric Flux via the Divergence Theorem from Vector CalculusThe Math of Bubbles // Minimal Surfaces & the Calculus of Variations #SoME3Basic Tables in LaTeX  #shorts7 Ways to Level Up Your MATH SUPERPOWERSThe worst ALGEBRA MISTAKES I see as a Math Prof  **dont do these**
Dr. Trefor Bazett |

How I make beautiful GRAPHS and PLOTS using LaTeX

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER