How to make beautiful math graphics using Tikz & LaTeX

  Рет қаралды 148,258

Dr. Trefor Bazett

Dr. Trefor Bazett

Күн бұрын

Get started with LaTeX using Overleaf: ► www.overleaf.com/?.... My thanks to Overleaf for sponsoring today's video.
Check out the previous videos in my LaTeX playlist:
► • LaTeX Tutorials
Check out my MATH MERCH line in collaboration with Beautiful Equations
►www.beautifulequation.com/pag...
In this video we're going to talk about making diagrams and other graphics using the tikz package in LaTeX. This package makes it really easy to create all the normal geometric shapes like lines and circles, but more importantly to precisely control the look and placement of these graphics. The use of "nodes" makes it particularly easy to make complicated diagrams where one uses relative instead of absolute placements.
You can also check out the actual document I use in this video here: ►www.overleaf.com/read/zzbhmgt...
0:00 Intro to Tikz
0:28 LaTeX Editors and Overleaf
1:16 What to put in the preamble
2:40 Drawing Lines, Circles, Ellipses
6:02 Drawing Rectangles and Grids
8:00 Centering and Scaling
9:25 Color, Dashed, Fill, Shading
11:52 Arrows and Thickness
12:50 Text and Nodes
15:35 Node Example Diagram
21:38 More Complicated Example
COURSE PLAYLISTS:
►DISCRETE MATH: • Discrete Math (Full Co...
►LINEAR ALGEBRA: • Linear Algebra (Full C...
►CALCULUS I: • Calculus I (Limits, De...
► CALCULUS II: • Calculus II (Integrati...
►MULTIVARIABLE CALCULUS (Calc III): • Calculus III: Multivar...
►VECTOR CALCULUS (Calc IV) • Calculus IV: Vector Ca...
►DIFFERENTIAL EQUATIONS: • Ordinary Differential ...
►LAPLACE TRANSFORM: • Laplace Transforms and...
►GAME THEORY: • Game Theory
OTHER PLAYLISTS:
► Learning Math Series
• 5 Tips To Make Math Pr...
►Cool Math Series:
• Cool Math Series
BECOME A MEMBER:
►Join: / @drtrefor
SOCIALS:
►Twitter (math based): / treforbazett
►Instagram (photography based): / treforphotography

Пікірлер: 104
@isaackay5887
@isaackay5887 2 жыл бұрын
Ever since I learned how to use LaTeX, I've haven't touched MS Word - nothing can make me go back
@hegelscat9423
@hegelscat9423 2 жыл бұрын
Had a classmate who would refuse to use Latex, instead used word, no amount of convincing could get her to ditch word.
@nikosnikolakis6991
@nikosnikolakis6991 Жыл бұрын
word is far more easy to use to get something out
@TranquilSeaOfMath
@TranquilSeaOfMath Жыл бұрын
I like LaTeX better than MS Word
@dafphtthedislikeupdater7836
@dafphtthedislikeupdater7836 Жыл бұрын
ikr
@T12J7
@T12J7 3 ай бұрын
I like Word due to the collapsible headers feature.
@zealous919
@zealous919 2 жыл бұрын
I know you get a lot of these comments, I’m not trying to be annoying. But if you have the time and patience, please keep uploading (I understand if you can’t). You’re one of my favorite channels on this entire site. I love being able to sit back after a long day (basically everyday) and just watch math videos, especially from you since you’re a great presenter. Thanks
@DrTrefor
@DrTrefor 2 жыл бұрын
That is so nice of you!
@alib5503
@alib5503 2 жыл бұрын
you explain complex and arcane commands extremely well! Thanks man!
@AdobadoFantastico
@AdobadoFantastico 2 жыл бұрын
This is so cool. I'm only exploring math again recently and wanted to find a way to use the latex learning to do something more.
@johnchessant3012
@johnchessant3012 2 жыл бұрын
For the longest time I thought TikZ was too complicated and resorted to making my graphs in Geogebra and attaching them to the latex file as pictures. Finally buckled down to learn it to draw binary trees for a cs class I was taking and later I also learned TikZ-cd to draw commutative diagrams for my number theory course. Definitely a cool package!
@diribigal
@diribigal 2 жыл бұрын
The right Desktop version of Geogebra can export to TikZ code, so if you like Geogebra, you can still produce TikZ
@JimSmithInChiapas
@JimSmithInChiapas 2 жыл бұрын
@@diribigal Thanks for the info -- I didn't know that. I still use GeoGebra Classic 5, and I now see that it can indeed export drawings as TikZ code. (Under *File* --> *Export* .)
@FranzBinder20
@FranzBinder20 Жыл бұрын
The Node Example Diagram is more or less exactly what I needed. Thanks!
@ZackRekeSkjell
@ZackRekeSkjell 2 жыл бұрын
As previously, great and informative video! I have learned a lot from them and I am looking forwards to the next one.
@gudaguda5299
@gudaguda5299 9 ай бұрын
Very good tutorial for tikz! It also helped me learn LaTeX better!
@patheba4394
@patheba4394 2 жыл бұрын
I was really waiting for this video
@hengky753
@hengky753 2 жыл бұрын
Nice and clear. I hope for more videos about drawing and plot from this channel.
@LordChancletus
@LordChancletus 2 жыл бұрын
I'm so hyped for this series! Looking forward in learning Tikz and pgfplots in such a chill and well explained manner. Can you maybe throw in some circuitikz later on? 👀
@DrTrefor
@DrTrefor 2 жыл бұрын
Not a bad idea!
@lumbradaconsulting6825
@lumbradaconsulting6825 2 жыл бұрын
Very cool, thank you
@jirodelPenderisco
@jirodelPenderisco 2 жыл бұрын
Excelente. Muchas gracias.
@josefernandezvargas9189
@josefernandezvargas9189 7 ай бұрын
Bro this channel is \textbf{UNDERRATED}
@michaelrudert3406
@michaelrudert3406 2 жыл бұрын
Hi Dr. Bazett, let me use this opportunity to thank you for all those really interesting and really good explained videos over all the fields of applications of mathematics and the useful software for visualizing it. There was no single video that bored me. 👍
@DrTrefor
@DrTrefor 2 жыл бұрын
Glad to hear that!!
@wjrasmussen666
@wjrasmussen666 2 жыл бұрын
I was worried that you were done making these videos. Thanks for the LaTeX videos.
@Nalisification
@Nalisification 2 жыл бұрын
I love latex! I write everything in is using orgmode. It's amazing
@eguineldo
@eguineldo Ай бұрын
That with arrows is going to be very nice
@ciocio5740
@ciocio5740 4 ай бұрын
Amazing t-shirt!
@greisthomson
@greisthomson 2 жыл бұрын
I'm having project in my last SEM. This might have been more useful if it was uploaded atleast a few days back. Anyway, Thank you for the Latex tutorials.
@muhammadadil3981
@muhammadadil3981 2 жыл бұрын
great sir .... Sir, can you show us how to draw subfigures in latex, like 1x2, or 2x2
@kingsgambit
@kingsgambit 2 жыл бұрын
there is an error: in 10:10 you say that the point specified before arc is its center. It is its starting point for the arc line though.
@amirkhan355
@amirkhan355 10 ай бұрын
Thank you so much. Where is the link to the latex doc BTW?
@AlexLiberzon
@AlexLiberzon Жыл бұрын
Could you please record a video about how do you shoot these beautiful videos with the screen recording on your background.
@fahadkhan5260
@fahadkhan5260 2 жыл бұрын
I should we learn math in this way. ❤️
@econhelp583
@econhelp583 2 жыл бұрын
I was just thinking that I wanted to watch a few ( or many!) videos on LaTeX. LaTeX has been around a long time and I have known about it and dabbled with it for well over a decade. I think that historically, the main reason that LaTeX has not gone viral is due to software installation and maintenance headaches. I discovered Overleaf last year and it makes using LaTeX much much easier. I am hoping that products like Overleaf encourage instructors to bring LaTeX into the math curriculum in a formal way and to actively encourage the use of LaTeX. I am very glad to have subscribed to Dr. Bazett’s KZbin channel. Well done and thanks for the videos. I am looking forward to more videos on LaTeX!
@philperry6564
@philperry6564 2 жыл бұрын
The main reason that LaTeX has not gone viral is, is because it's not as easy to use as Word or Pages. You have almost complete control over the outcome, at the cost of usability. Same with Linux. I do agree, that maintaining a source document that has a lot going on, is very difficult and time consuming.
@jadepangwaiho
@jadepangwaiho 2 жыл бұрын
I love your videos! May I ask is there any way to draw the graphs from graph theory by tikz?
@DrTrefor
@DrTrefor 2 жыл бұрын
Absolutely! The node based approach in the later examples works great for graph theory stuff
@haraldurkarlsson1147
@haraldurkarlsson1147 2 жыл бұрын
There is probably a library for that in either tizk or pgf or possibly a special latex package.
@Ting3624
@Ting3624 2 жыл бұрын
The documentation of Tikz is actually a pretty good read, albeit a very long doc, especially the tutorial part, it has a lot of ... let's say ... Germanic humor :)
@alexmadsen9394
@alexmadsen9394 4 ай бұрын
Please do a tutorial to circuitikz !!!🙏
@abiuniverse
@abiuniverse Жыл бұрын
How to adjust the distance between boxed nodes (instead of using below=of etc)?
@Andrumen01
@Andrumen01 Жыл бұрын
LaTeX has really evolved ever since I started using it back in 2002! Amazing! Do you know where these packages are being developed? Like, the actual programming code rather than the markdown? Thanks!
@DrTrefor
@DrTrefor Жыл бұрын
Packages are all over the map, individuals or groups who are updating their specific packages like tikz or whatever. There is no central control.
@Andrumen01
@Andrumen01 Жыл бұрын
Thank you.
@madhavsirohi2225
@madhavsirohi2225 Жыл бұрын
13:56 This is even better than adobe tools!!!
@haraldurkarlsson1147
@haraldurkarlsson1147 2 жыл бұрын
Dr. Trefor, I am looking forward to your next "tiks" presentation. I am particularly interested in graphing functions. The one thing I have struggled with is plotting a circle with pgf. It will only give me a half circle. I want to use the actual function rather than using a "cheat" like solving it first, finding the center and radius and then just plotting with tikz's \draw circle. By the way the scaling function you mentioned early on will work fine in standalone document class but if you have it inserted in text then the transformation will not make space in the text for that image. It will overlap the text. I have watched a bunch of videos (there are not many on tikz) and I am always surprised by the depth and flexibility of the software - no wonder, the user's manual is 1000 pages plus. Thanks!
@DrTrefor
@DrTrefor 2 жыл бұрын
The problem is that a circle isn't the graph of a function so unless you do something like convert to polar coordinates, you can't plot the full circle using function plotting.
@haraldurkarlsson1147
@haraldurkarlsson1147 2 жыл бұрын
@@DrTrefor Thanks for the reply. As far as I can tell it also runs into a problem with negative square roots so it breaks. Perhaps someone will come up with a solution that involves plotting one half (the positive part) and then simply mirror it.
@syedshahfahd2659
@syedshahfahd2659 Жыл бұрын
I want to use alphanumeric characters in the x-axis for a graph, but whenever I try to punch the alphanumeric characters in the x-axis coordinate, it shows errors. Can you help in this regard?
@TheBuilder
@TheBuilder 5 ай бұрын
typing up my ascii notes in this rn to impress my friends lets gooo
@lordstevenson9619
@lordstevenson9619 2 жыл бұрын
Can’t wait for more tutorials, very well explained. I’ve got a long way still, but I would love to write my dissertation using LateX. I’ve dabbled with it but need more exposure with the code.
@DrTrefor
@DrTrefor 2 жыл бұрын
You should totally do your thesis in LaTeX, it is great for that.
@lordstevenson9619
@lordstevenson9619 2 жыл бұрын
@@DrTrefor I’ve pretty much finished my first year, I got 3 more left including an industry placement year, so I got plenty of time to practise and think about ideas. I’m doing a BSc Mathematics & Computer Science degree and I’m loving it. Your channel and many in the KZbin math community keep me motivated. Much love. ❤️
@robwin0072
@robwin0072 2 жыл бұрын
Practice Practice Practice I began at NASA in the mid-eighties when it was TeX. When I say, LaTeX is to TeX, as Browsers was for Arpanet (Predecessor to the Internet). Without LaTeX, the method would remain in obscurity. Now, LaTeX provides the avenue for mass adoption. I hope so. I think it should begin with middle school and get progressively expansive year after year.
@peterstucklschwaiger2830
@peterstucklschwaiger2830 2 жыл бұрын
Love the tutorial (like the others)! I really should give TikZ a try the next time I have to draw graphs … that seems so much prettier than anything doable with (online) PowerPoint (not to mention the hassle with the arrow connection points … and that even online PowerPoint is a PIT* on LInux systems). And maybe ditch the KoMa document classes for further projects (sometimes them are too much of a paronomasia ;-)). Yet … I am puzzled you're typing “LaTeX” instead of commanding “\LaTeX” :-/
@SriHariBH
@SriHariBH 2 жыл бұрын
Small request - please make a video on how you create your videos. :)
@ami6packs
@ami6packs 10 ай бұрын
Any tips on using latex to make nice software architecture diagrams..
@jagula
@jagula 2 жыл бұрын
Can you put something next to curved arrows (ones you used contols on)?
@DrTrefor
@DrTrefor 2 жыл бұрын
Think I would just use a new mode to “manually” place the text, although there likely is a cleaner way I’m just not aware of yet
@alecclews
@alecclews 2 жыл бұрын
It looks like TikZ is easier to use than ImageMagick when drawing diagrams? I use Markdown instead of LaTeX (simple needs), but I'm always on the lookout for an easier way to create diagrams.
@DouglasKubler
@DouglasKubler 10 ай бұрын
Great learning by example series. You mentioned GeoGebra. Oh! I see below a comment that GeoGebra can export as Tikz. Have you found other products that will export Tikz?
@chickengoatfish
@chickengoatfish 9 ай бұрын
@maxferreira1221
@maxferreira1221 6 ай бұрын
What do you think about pstricks?
@SocratesAlexander
@SocratesAlexander 2 жыл бұрын
Can we export a document to the InDesign software while keeping the formatting?
@DrTrefor
@DrTrefor 2 жыл бұрын
I don’t believe LaTeX can do this, because the formulas etc all need latex, but certainly one can export the tikz image and put that into indesign
@SocratesAlexander
@SocratesAlexander 2 жыл бұрын
@@DrTrefor I think we can export a "tikz" image as a "jpg" or a "png" image... Do we do this from inside overleaf, or from the compiled and saved "pdf" file? And we are still waiting for the new tutorial....
@picsi-software
@picsi-software 2 жыл бұрын
Its not just for maths... :) I use it for all my consulting reports
@jamesmorgan3539
@jamesmorgan3539 2 жыл бұрын
The pronunciation of TikZ is debatable. The two competing pronunciations are "tik-zee" and "tics". You can hear both in this video! "tik-zee" @2:38 and "tics" @2:26. For me, "tics" is just short for "tik-zee." Tikz is a recursive acronym of the German phrase "TikZ ist kein Zeichenprogramm." Translated to English, "TikZ is not a drawing language."
@mulanidhaval1524
@mulanidhaval1524 6 ай бұрын
Please help me , I can't make arrow from bottom box to top box I got this type of error:- Use of \tikz@curveCdot doesn't match its definition....ntrols +(right:17mm) and + (right:17mm) (A..
@allenli6715
@allenli6715 2 жыл бұрын
Could you make a video talking about how do you survive your PhD in uoft.
@DrTrefor
@DrTrefor 2 жыл бұрын
I actually have this exact video planned! Maybe two months from now or thereabouts in the schedule:)
@Fanaro
@Fanaro 4 ай бұрын
Do a video comparing TikZ to PSTricks
@Wutheheooooo
@Wutheheooooo 5 күн бұрын
Geogebra can make Tikz code which can be powerful.
@davidecascioli4717
@davidecascioli4717 2 жыл бұрын
when will the next video come out?
@DrTrefor
@DrTrefor 2 жыл бұрын
Haha about one month:)
@robwin0072
@robwin0072 2 жыл бұрын
Dr., after watching this video, I stumbled attempting to understand why to use Tikz for such efforts; when one can use drawing software, then \include the image in LaTeX *.tex file. Why would one not considered this Tikz effort a waste of time?
@Croesquared
@Croesquared 2 жыл бұрын
If you already have experience using vector graphics software like Illustrator or Inkscape, then you may consider those. However, TikZ is nice because the image is integrated into your document. Therefore, if you would like your labels to be in the same font as your paper, TikZ is better. TikZ also has many extension packages that you can use to create varied graphics arguably easier than using external tools, like CircuitTikZ for circuit diagrams.
@DrTrefor
@DrTrefor 2 жыл бұрын
To me, both have their uses. Tikz is good because you can mathematically control everything with coordinates and formulas etc, AND can display math formulas etc using latex all in your diagram with full control. But I still for sure make graphics in illustrator or whatever else as well, depending on need.
@robwin0072
@robwin0072 2 жыл бұрын
@@DrTrefor I began at NASA in the mid-eighties when it was TeX. When I say, LaTeX is to TeX, as Browsers was for Arpanet (Predecessor to the Internet). Without LaTeX, the method would remain in obscurity. Now, LaTeX provides the avenue for mass adoption. I hope so. I think LaTeX be in the curriculum beginning with middle school and get progressively expansive year after year.
@luisalejandrohernandezmaya254
@luisalejandrohernandezmaya254 Жыл бұрын
Good! but please use a dark background.
@haraldurkarlsson1147
@haraldurkarlsson1147 Жыл бұрын
TikZ is an excellent package but the learning curve is steep - a sheer cliff like the steep side of Half Dome in Yosemite National Park.
@eetulehtonen69
@eetulehtonen69 2 жыл бұрын
Latech?
@DrTrefor
@DrTrefor 2 жыл бұрын
Haha people like saying it both ways
@Philoreason
@Philoreason 2 жыл бұрын
Basically, don't do it. LateX is NOT for drawing. You much better off drawing your diagram / charts using other tools, then import them as picture.
@Heisenberg2097
@Heisenberg2097 2 жыл бұрын
The problem about LATEX is the same as about Maths. The learning curve is too high. Once you get into it. It is fluid. But if you just want to write some documents... the effort is too high. Another bad option is to use Office products... only hell smells better. Today u can write beautiful documents with plain HTML... add some SVG and it is print perfect. Resolution independent. No matter you write for a scientific publication or the next high-gloss magazine... it will come out perfect due to vector maths. And it will be device independent. The future keeps on moving. BTW. For HTML u don't need to install no CYGWIN or MinGW or Ubuntu... even ur phone no matter if Android or IOs can serve u good. And everybody knows... HTML will be there and readable the next five to seven thousand years. Whereas LATEX even today noone can read. At least noone with a reason-capable mind. It is like learning latin... it will not impress any girl. maybe some old hunches that had to go through that hell too. But no cute cookie. I was cool enough to impress a girl with solving the Maxwell equations. See. Solving the equations is one thing. But impressing a girl with that is MASTER CLASS!!!
@meguellatiyounes8659
@meguellatiyounes8659 Жыл бұрын
tikz animation in beamer
@yatsenkoanton
@yatsenkoanton 2 жыл бұрын
How the hell did this appear in my youtube if all I watch are Vtubers talking about h*ntai and other indecent activities? I indeed have a degree but I chose the path of a degenerate and never watched a math related video on youtube for years Great content tho, I don't know why ppl still use WYSIWYG for their diplomas wtf
@DrTrefor
@DrTrefor 2 жыл бұрын
The KZbin algorithm knows all
@ant3978
@ant3978 2 жыл бұрын
why does he call it latek not latex
@diribigal
@diribigal 2 жыл бұрын
Basically, because TeX is an abbreviation for the Greek word that gave rise to the English word "technical". See en.wikipedia.org/wiki/TeX#Pronunciation_and_spelling
@wrcz
@wrcz 2 ай бұрын
@@diribigalso it's the same pretentious bullshit like GIF's creator "intending" it to be pronounced as jiff. no thanks
@bishalthapa2179
@bishalthapa2179 Жыл бұрын
good explanation, but was not helpful to me.
@thshm2938
@thshm2938 2 жыл бұрын
But, would'nt this be wasting time????
@diribigal
@diribigal 2 жыл бұрын
It depends what you're trying to do. Especially if you use the power of LaTeX to change the style of the document at once, but also if you want fine-grained control of the vector images while seamlessly including math expressions and avoiding switching back and forth with something like Illustrator, this might be right for you. Since I don't know illustrator and find it easier to make programmatic diagrams in TikZ than Geogebra or something, it's sometimes right for me
@viktorbakacs2867
@viktorbakacs2867 2 жыл бұрын
just use photoshop )
@larrytrahan8260
@larrytrahan8260 2 жыл бұрын
diễn xàm quá
How I make beautiful GRAPHS and PLOTS using LaTeX
28:46
Dr. Trefor Bazett
Рет қаралды 428 М.
My favorite LaTeX packages for writing beautiful math documents
28:48
Dr. Trefor Bazett
Рет қаралды 196 М.
$10,000 Every Day You Survive In The Wilderness
26:44
MrBeast
Рет қаралды 96 МЛН
Graphics in LaTeX with TikZ
46:23
Sebastiano Tronto Lectures
Рет қаралды 20 М.
How to self study pure math - a step-by-step guide
9:53
Aleph 0
Рет қаралды 1,7 МЛН
LaTeX for Students - A Simple Quickstart Guide
13:51
Jake B
Рет қаралды 99 М.
My favorite LaTeX Tricks to save time
17:04
Dr. Trefor Bazett
Рет қаралды 61 М.
Painting a Landscape with Maths
42:00
Inigo Quilez
Рет қаралды 694 М.
How i write math in Obsidian
11:34
Omix
Рет қаралды 43 М.
The Dirichlet Integral is destroyed by Feynman's Trick
8:15
Dr. Trefor Bazett
Рет қаралды 141 М.
Using Tikz and PgfPlots (1 of 8: Basic Drawing)
10:45
Maths Partner
Рет қаралды 35 М.
Intro to LaTeX : Learn to write beautiful math equations || Part 1
19:09
Dr. Trefor Bazett
Рет қаралды 1 МЛН