How I make beautiful GRAPHS and PLOTS using LaTeX

preview_player
Показать описание

Check out the previous videos in my LaTeX playlist:

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.

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

Check out my MATH MERCH line in collaboration with Beautiful Equations

COURSE PLAYLISTS:

OTHER PLAYLISTS:
► Learning Math Series
►Cool Math Series:

BECOME A MEMBER:

SOCIALS:
Рекомендации по теме
Комментарии
Автор

Very good video. I am a double degree student in math and comp sci, and LaTeX is one of those things that you both remember but never entirely. Having a whole video with dedicated examples is a good reference for anyone who cannot quite recall how to do individual tasks. This is a better resource than the online forums recommending (and I do not joke) 20+ year old advice, which may now me deprecated.

Filup
Автор

Years ago I helped develop the Latex language -- When I worked for Vandelay Industries.

stevematson
Автор

It is so nice to have a well articulated tutorial on Latex at the right speed and with a well presented screen. Plus the enthusiastic smile of the lecturer who carries so much positive emotions. Thanks a lot!

Childerick
Автор

It was a nice surprise to see that many of the commands are quite similar to MATLAB’s or Matplotlib’s plotting and formatting environment commands

the-alchemist
Автор

I generally use matplotlib (Python library) with TeX fonts for plotting and export as pdf or eps for later adding to my LaTeX document. Even though it produces very high quality plots, I have to manually adjust the font size (using trial & error) to match the document font size.
Pgfplots seems wonderful to get the best of both worlds, especially with the external data file option. Thank you !

SourabhBhat
Автор

A new LaTeX user here. This video is very helpful. I am going to check other videos as well. Thank you for sharing your knowledge.

dw
Автор

Dude, your content is a goldmine for me as an aspiring Data scientist. Another brilliant video!

fredericoamigo
Автор

I wish I had just 1 percent of your brains. Great work Dr Bazett.

NuclearPhysix
Автор

As an older person, when I went back to take some college for an additional degree (~2010), I struggled with coming up with graphing tools like this. I wish I had found your material then but it may not have existed, I don't know. I ended up kluging some stuff together with Excel and what-not. (first round of school, we typed papers on typewriter and left large blanks, where we would hand-write formula/ symbols. lol)

Love your videos, even if I don't have a big use for them now (retired). Some folks might not appreciate how nice these tools are. (okay, I'm being curmudgeonly, "kids don't know how good they have it, we had to walk... uphill both ways... ", "You had ones and zeros? We programmed with only ones!" lol)

mikefochtman
Автор

In the "old days" I used gnuplot which produces either eps, png or latex-code. It is actually a old, (then) convinient tool. One of the main points for me was, that the plots have a common style and not look too different. Another important feature was, that als the labels in the graph have exactly the same font and adapted fontsize as found in the text. I like this package you presented here and I think I will try it

bastianfrom
Автор

11:58 the way I consider the anchors is that I place a bounding box around the label, then the point on that bound box that sits on the axis is the (in this case) the south west corner of the bounding box

FelipeBalbi
Автор

LaTeX is just something that physicists ‘do’, ” explains chief editor ( Nature Magazine) Andrea Taroni. “Trying to get them to do otherwise is like trying to herd cats.”

ppal
Автор

Nice presentation and I agree you cannot simply watch this stuff. You have to do it yourself in order to learn it. LaTeX does have steep learning curve but the habits you develop when working with it will help when working with other programs. Fortunately, the PGFPLOTS manual is excellent with great examples and explanations.
Finally, it is simplest to set compat=newest inside the pgfplotsset (in the preamble) and not worry about the version you are using.
I would like to see more on working with external data - for instance csv files.
Thanks.

haraldurkarlsson
Автор

Very good job. Thank you very much Dr. Trefor.

zahidurrahaman
Автор

I studied Electrical Engineering in Lübeck, Germany, where the creator of TikZ Till Tantau teaches as a Professor :D

janstoeb
Автор

it's lucky to learn from a wonderful teacher.

rayenwiller
Автор

This is really amazing. I was learning PostScript with GhostScript because I have a PostScript printer. But this Latex seems to be more powerful for making graphics. Thanks.

yolamontalvan
Автор

bruh, I've been waiting for this video soooo much. Grazie mille! *thankful italian gestures*

bluedoggo
Автор

This is great! I use Tex all the time, but now I'll be able to make graphs with Absolute Confidence!

DrWeselcouch
Автор

A big advantage of LaTeX is that it is programmatically generable in a way that, say, MS Word documents are not (you can script Word using Visual Studio, but you probably shouldn't). For stereotyped report creation, for example, it's a very lightweight technique.

I primarily use Mathematica to generate plots for inclusion in LaTeX documents because I have even more control over the output, as well as three decades' experience using the software. Lately I've been using R quite a bit.

davidgillies