How I make beautiful GRAPHS and PLOTS using LaTeX

Поділитися
Вставка
  • Опубліковано 11 січ 2025

КОМЕНТАРІ •

  • @Filup
    @Filup 2 роки тому +196

    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.

  • @stevematson4808
    @stevematson4808 2 роки тому +110

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

    • @comporellon
      @comporellon Рік тому +5

      Founded by Art Vandelay?

    • @stevematson4808
      @stevematson4808 Рік тому +1

      @@comporellon Yes, he was a good friend of mine. Did you know him too?

    • @Arycke
      @Arycke Рік тому +3

      ​@comporellon don't forget Don Knuth, creator of TeX also! LaTeX is amazing

    • @stevematson4808
      @stevematson4808 Рік тому +4

      @@Arycke oh yes, good ol Don.
      Don was on my bowling league.

    • @Arycke
      @Arycke Рік тому +4

      @stevematson4808 thank you for your development of LateX sir I appreciate your contribution.

  • @the-alchemist13
    @the-alchemist13 2 роки тому +73

    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

    • @fgp1979
      @fgp1979 2 роки тому +16

      Other way around I believe: the commands in Matlab and matplotlib are similar to latex's!

    • @youerny
      @youerny 2 роки тому +1

      The root of those API are from Matlab, but they are so simple and widely used that introduces something totally different would just consume precious time to learn again. Still, as a new user of Python and all the most widely adopted libraries, I must confess that the “anatomy of a figure” in matplotlib is still a bit confusing when compared to Matlab’s. I spent many years before switching, but still not everything is straightforward to me.
      And mixing NP or PD with matplotlib is nice, but introduces some peculiarities for each data substrate that could be made more uniform. I am referring to syntax for a plot, vs a plot from a dataframe, vs a plot from a np.math array. Small differences are disorienting and matlab is more straightforward.
      But it is free, as a beer in a drunk speech, therefore thanks to the community for sharing it all with us

  • @SourabhBhat
    @SourabhBhat 2 роки тому +45

    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 !

    • @FranseFrikandel
      @FranseFrikandel Рік тому +7

      I believe if you just set the figure size correctly in matplotlib, and then don't add any width settings or similar to your includefigure in LaTeX, the font sizes should translate correctly.

  • @d029w7
    @d029w7 2 роки тому +6

    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.

  • @fredericoamigo
    @fredericoamigo 2 роки тому +11

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

  • @FelipeBalbi
    @FelipeBalbi 2 роки тому +7

    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

  • @mikefochtman7164
    @mikefochtman7164 2 роки тому +11

    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)

  • @aulasdematematicaefisica
    @aulasdematematicaefisica 3 місяці тому +4

    Very clear ! You did your PhD in algebraic topology, but you do very well math education (I'm a math's teacher in middle school).

  • @Childerick1
    @Childerick1 2 роки тому +38

    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!

  • @bastianfrom77
    @bastianfrom77 Рік тому +7

    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

  • @haraldurkarlsson1147
    @haraldurkarlsson1147 2 роки тому +10

    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.

  • @marshp2749
    @marshp2749 24 дні тому +1

    This was so helpful for the simple examples I need that get a bit lost in the pgfplots documentation. Thank you.

  • @jacobstarr9010
    @jacobstarr9010 11 місяців тому +2

    I'm in a physics lab and am trying to learn LaTeX to make it easier to make good lab reports, so thank you for these videos

  • @NuclearPhysix
    @NuclearPhysix 2 роки тому +4

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

  • @waynebyrne2201
    @waynebyrne2201 25 днів тому

    Excellent video. As a tech writer, the documentation (ok, it's big) is one of the best I've seen in a LONG time

  • @ppal64
    @ppal64 2 роки тому +19

    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.”

  • @janstoeb
    @janstoeb 2 роки тому +4

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

  • @bluedoggo4429
    @bluedoggo4429 2 роки тому +3

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

  • @yolamontalvan9502
    @yolamontalvan9502 2 роки тому +7

    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.

    • @Bobbias
      @Bobbias 2 роки тому +1

      Iirc LaTeX often gets compiled to postscript in a lot of cases.

    • @youerny
      @youerny 2 роки тому +1

      I truly respect you for the effort of learning PS (!!) in 202x. Please make you a favor and go some steps upwards: ps is to docs as assembly is to programming. You can do it, but it almost always not needed today.
      One more layer of indirection could be useful, automating LaTeX generation by means of python and running it from data at compile time -if needed-.

  • @DrWeselcouch
    @DrWeselcouch Рік тому +1

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

  • @zahidurrahaman428
    @zahidurrahaman428 2 роки тому +2

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

    • @DrTrefor
      @DrTrefor  2 роки тому +1

      Glad you liked it!

  • @tiagoinenglish
    @tiagoinenglish 10 місяців тому

    Thank you so much, Mr. Bazett! I didn't even know it was possible do graphics on LaTeX. I've just learnt something new! It was pretty exciting. I hope I can do the graphs I need to do

  • @youerny
    @youerny 2 роки тому +28

    Many packages available, but after several docs I definitely opted for matplotlib+pdf despite coding the plots in the doc src. As far as I know I just opted for a control flow design package because the quality of the feedback control loops were astonishing.
    LaTeX should be mandatory, but try to look for the best compromise among orthodox approach and throughput (how long it takes to complete this chapter, one week or three?). :)

    • @youerny
      @youerny 2 роки тому +1

      @gautha pandith every task, its tool. I totally agree with you.
      On the other hand we should consider with huge humility that the author of TeX is a genius, and definitely not someone prone to adopt efficient trade-offs like both of us. The effort to write such an intricate piece of SW, after having studied editor graphics and Fonts deeply, in order to write the most wide and beautiful books (encyclopedia today…?) about Computer Science, just because his publisher changed the font for his books with something he disliked, is not exactly the average scientist aiming at publishing to avoid death :).
      Jokes aside, thank you with all my gratitude, Dr Knuth and Dr. Lamport, for making the world a better place with your creations (La)TeX!

  • @ImStian
    @ImStian Рік тому +1

    Fantastic video! I'm writing my bachelor's thesis next semester it's going to look super fancy with these plots! :D

  • @rayenwiller
    @rayenwiller 5 місяців тому

    it's lucky to learn from a wonderful teacher.

  • @NuclearPhysix
    @NuclearPhysix 2 роки тому +3

    I admire your knowledge and clarity of explanations. Can I request/suggest a series on the history of famous mathematical functions such as Laplace, Gamma, Fourier, etc. How did they come about?

    • @DrTrefor
      @DrTrefor  2 роки тому +2

      That's a great idea!

    • @Ajajqiqjaa
      @Ajajqiqjaa 2 роки тому

      @@DrTrefor thank you for your great effort !!!!!!!

  • @stephenpaapaowereduassefua5371
    @stephenpaapaowereduassefua5371 2 роки тому +2

    This video is really useful. Thanks a lot sir

  • @soufianehn8817
    @soufianehn8817 Рік тому

    Just Amazed by all informations contained by Latex...Too Much Thanks For You Dr Trefor for all the explanations and the interesting Tutorials about OverLeaf..

  • @ТимофейЧерников-щ2х

    Thank you for this amasing video! Although I prefer to plot in matplotlib in my Jupyter notebook and then import pgf plot to Latex. It's more convenient if you're doing some calculations on the data before plotting it and might want to change source of the data/add some other calculations.

  • @emanuelorzusa
    @emanuelorzusa 2 роки тому

    ¡Gracias!

  • @meu22422
    @meu22422 2 роки тому +2

    I use Matlab to plot and then adjust its formating and styles etc using its plot editing tool. Then save it as .eps file and load into latex. Crisp looking graphs but as you said, symbols and fonts are not same as latex maths. But as long as it is consistent for all plots, it's ok.

  • @sergiop.4909
    @sergiop.4909 2 роки тому +2

    Very helpful thanks!! Plotting with this package looks easier than plotting on matlab or octave haha

  • @davidgillies620
    @davidgillies620 2 роки тому +7

    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.

    • @youerny
      @youerny 2 роки тому +1

      MS word is for administrative staff. If your job is different, LaTeX is your tool! Possible in one of the modern online incarnations

  • @fadl999
    @fadl999 2 роки тому +2

    Thanks a lot for the video and sharing the latex template.

  • @hrperformance
    @hrperformance 2 роки тому +2

    Whoohooo! This is going to be so useful!!
    (I haven't actually watched it yet but I know it will be good haha)

  • @angelamusiema
    @angelamusiema Рік тому

    Che bello!!!!! Il punto centrale,nel cerchio e nella circonferenza!!!!! Whaooo!

  • @kevalan1042
    @kevalan1042 2 роки тому +274

    call me old-fashioned, but I find that using a cloud-based editor is not consistent with LaTeX's open source philopsophy. Great video though

    • @kevalan1042
      @kevalan1042 2 роки тому +6

      @@lolerie those also rub me the wrong way :)

    • @lolerie
      @lolerie 2 роки тому +3

      @@kevalan1042 well, github actions at least is open source, even if with bad license.

    • @Heisenberg355
      @Heisenberg355 Рік тому +25

      Well, especially when writing a thesis that contains company data for example, it feels safer to do it offline.

    • @Ken-er9cq
      @Ken-er9cq Рік тому +7

      The problem is that open source takes effort, and unless it ties in with something commercial, it is unpaid. The consequence is that some types of software will never be available as open source, unless they are failed commercial projects that are generously open sourced.

    • @kevalan1042
      @kevalan1042 Рік тому +9

      @@Ken-er9cq true, but LaTeX has fared pretty well under the open source model

  • @FoxtwoPC
    @FoxtwoPC 2 роки тому +3

    Thank you for a fantastically explained and generally helpful video -- I only wish it existed or I was aware of these tools when I wrote my thesis in 2011 using LaTeX and a DIY MATLAB/Octave/Bash script set that would sequentially run Matlab/Octave scripts to generate, label, export plots into a graphics folder and then compile my LaTeX doc where they would be added using '\includegraphics' then ->pdfLaTeX->open in some Ubuntu pdf viewer to create my "instant" preview...something like pgfplots would have helped me close the loop in a much simpler manner...I think at the time I was just happy that I got BibTex working...

  • @rogeriosoares8272
    @rogeriosoares8272 2 роки тому +2

    Very helpful. Thank you for the video

  • @JR-uc3nk
    @JR-uc3nk 6 місяців тому

    Hey dude I love you with all my heart you have so many important videos that help me haha

  • @zyxzevn
    @zyxzevn 2 роки тому

    And I thought that Latex was just for plain text and formulas. Thanks for showing this.

  • @keysersoze_6
    @keysersoze_6 2 роки тому

    Mate, you helped me a lot, i had to make loads of plots for my thesis!

  • @solarflair3613
    @solarflair3613 2 роки тому

    Those 3d plots look so sick !!!! Great stuff very cool

  • @MrRenanwill
    @MrRenanwill 2 роки тому +1

    I like to use SVG figures generated by Geogebra. The time it compiles is just larger in the first time you compile it. In the rest of the time, It looks like the time of inserting a PDF.

  • @muzaffarbashir4566
    @muzaffarbashir4566 Рік тому +1

    Plz do share your old overleaf project so we can learn more

  • @michaelgraff6978
    @michaelgraff6978 2 роки тому

    I knew TeX and LaTeX very very well when I was in college. I now have flashbacks.

  • @FelipeBalbi
    @FelipeBalbi 2 роки тому +3

    Very cool! I wish I had this video years ago when I started using latex and tikz. Personally, I like to put tikzpicture always inside a figure environment that starts with a \centering :-)

  • @ziedjbeli4811
    @ziedjbeli4811 2 роки тому +2

    Very helpful, thank you so much!

  • @whydoyouaskdude
    @whydoyouaskdude 2 роки тому +4

    Nice video. You don't need to specify color=red, just [red] will do the same.
    Also, did you know a node can contain literally anything? Even includegraphics commands to position images with nodes or even entire tikzpicture environments to reuse and easily move entire already made TikZ graphics. The possibilities are endless.

  • @saragalvan1159
    @saragalvan1159 2 роки тому +1

    I love latex, when overleaf started I really hate it! To me share Latex was heaven. But when they merge the two projects, I was forced to use overleaf and now I recognize that is really useful and I love the project! God bless you guys!

  • @alialzahrani1541
    @alialzahrani1541 2 роки тому

    Your video has made my life much easier.. thanks a lot 💐

  • @isaackay5887
    @isaackay5887 2 роки тому +5

    I'd love to see a video on using LaTeX to create graphs for solutions of inhomogeneous diffusion- / wave- equation BVPs (especially ones who's spatial operators are not self-adjoint - requiring to be put into Sturm-Liouville form)
    [Edit 1: I think it would be helpful to know how to do this here in LaTeX versus using secondary software like MATLAB, Python, Wolfram, or Geogebra, especially for lecture documentation purposes when trying to compare what would happen with different ICs and variations of dirichlet/neumann/robin BCs.
    By the way, love your videos, Dr. Bazett - keep up the terrific work!]
    [Edit 2: Ahh shoot - I had too much hope! It's such a powerful tool that sometimes I forget it's not an IDE 😅]

    • @DrTrefor
      @DrTrefor  2 роки тому +3

      So LaTeX doesn't "know" any math, it doesn't know how to solve a differential equation for instance. So that part I have to leave to you, but once you have a function or a vector field or whatever else, then LaTeX can be used to plot it.

  • @sg6280
    @sg6280 9 місяців тому

    Thank you! This was extremely helpful and well done!

  • @TranquilSeaOfMath
    @TranquilSeaOfMath 2 роки тому

    This is a nice overview/introduction to pgfplots.

  • @antoniocafualicamendes2370
    @antoniocafualicamendes2370 Рік тому +2

    Salvaste a minha tese. Muito obrigado pela aula linda e clara!

  • @jasonthomas2908
    @jasonthomas2908 2 роки тому

    I use Jupyter Notebooks + Gnu Octave. That way I can do computation stuff alongside my latex

  • @aweebthatlovesmath4220
    @aweebthatlovesmath4220 2 роки тому +2

    Love the shirt!

    • @DrTrefor
      @DrTrefor  2 роки тому +2

      Thanks! It is one of my favourites:D

  • @ewerybody
    @ewerybody 2 роки тому

    5:50 There is no auto-completion for these? Would be nice to mention where to look up those arguments.

  • @jonathanalexandremorazalme7495

    Very nice video! Thank you for the content!

  • @MukkuPavanKumarPHD
    @MukkuPavanKumarPHD 2 роки тому +2

    Thank you so much, sir. Can u suggest to me how to add a label to the axis?

    • @DrTrefor
      @DrTrefor  2 роки тому +1

      xlabel={} and ylabel={}

  • @vin84iitr
    @vin84iitr 2 роки тому

    Awesome video!! Adding a small request to demonstrate overleaf to use in journal article submission (preferably for Elsevier).

  • @drsumankhanal
    @drsumankhanal 2 роки тому

    Hi, thank you for the video. If you have time, could you please also teach on how to write latex class and latex packages: from basic to advanced?

  • @MinecraftJesusGaming
    @MinecraftJesusGaming 2 роки тому +2

    Ok this is something I need

  • @abdellahmrij4112
    @abdellahmrij4112 9 місяців тому

    Amazing courses excellent continuation

  • @erikfauser2418
    @erikfauser2418 2 роки тому

    very helpful video and easy to understand

  • @ocayaro
    @ocayaro 2 роки тому

    This video finally made me subscribe.

  • @MatteoBoffoakaStempelo
    @MatteoBoffoakaStempelo Рік тому +1

    Grazie.

  • @JohnVKaravitis
    @JohnVKaravitis 2 роки тому +1

    Jesus Christ. 3 minutes into this video, and I'm already exhausted looking at all this code!

    • @DrTrefor
      @DrTrefor  2 роки тому +1

      haha! I thought this the first time too!

  • @noblesavage149
    @noblesavage149 2 роки тому

    Looking forward to having a go with this in emacs!!!

  • @Serenesium
    @Serenesium 7 місяців тому +1

    1:18 Is no one going to mention how perfect the sponsorship segment is?

  • @rafrakesp8529
    @rafrakesp8529 2 роки тому +2

    I really appreciate this kind of videos, thank you so much!
    I want to go deeper and learn all the posibilities for customizing my graphs, i.e. fontsize, labels and title location, etc... Is there any recommendation for that?

  • @jaikanthp5924
    @jaikanthp5924 2 роки тому +3

    Sir, please make video on Interactive PDF using LATEX.

  • @georgeofhamilton
    @georgeofhamilton 29 днів тому +2

    Dr. Trefor Bazett DESTROYS LaTeX haters with GRAPHS and PLOTS

  • @pedrogonzalobrito
    @pedrogonzalobrito Рік тому

    Thank you very much! Excellent video 💯

  • @porthos892
    @porthos892 2 роки тому

    Very good and informative playlist of LaTex!!! Could you show also watermarks imports and images configurations. Like, how I could put the images accurately where i want..... Thanks for all your help!!!! awesome job!!!!!! 🔥🔥

  • @CaliChemist
    @CaliChemist 2 роки тому +2

    I love it!

  • @hosz5499
    @hosz5499 2 роки тому +2

    First great tool, many scientists love latex. would your scatter plots import large chunk of data in an external file ?

    • @DrTrefor
      @DrTrefor  2 роки тому +3

      There might be some technical upper bound, but in general yes you can import as many points as you wish

    • @hosz5499
      @hosz5499 2 роки тому

      @@DrTrefor can you use a command like /include so that all data is outside the latex file ?

  • @theultimatereductionist7592
    @theultimatereductionist7592 Рік тому +2

    11:15 I sure hope none of that whitespace/indentation is necessary by the compiler
    and is meant ONLY for the reader/user to be able to see clearly.

    • @DrTrefor
      @DrTrefor  Рік тому +1

      Yup, compiler ignore the white space. I very much wasn't focused on a sensible use of whitespace in this either.

  • @LizzieSanchez-r8t
    @LizzieSanchez-r8t 10 місяців тому

    Thank you very much! Excellent video

  • @ketantamhankar3620
    @ketantamhankar3620 Рік тому +1

    Hi! How would you plot an implicitly defined function on 2D axes? Also, if you want to highlight a specific point on a graph, how would you go about doing it?

  • @samuelnewport4970
    @samuelnewport4970 2 роки тому

    Great video, would be really useful to have access to the document code for quick reference

  • @oriontechtube
    @oriontechtube 2 роки тому +1

    very important video !

  • @pearseseun
    @pearseseun 2 роки тому

    Pls kindly do a video on package titlesec manipulation with tikz package......these are the areas that make professional.

  • @AhmetFrk347
    @AhmetFrk347 2 роки тому +1

    Dr. Bazett, are there any way to decrease pdf file size in LaTex. I am working on a 25 page document which has about 20 eps formatted figure. I use textmaker and the compiled pdf is 92 mb.

  • @oidbio2565
    @oidbio2565 2 роки тому +1

    Excellent video. Thank you! I was wondering if you do any videos on producing a video…a meta-training so to speak :). If not, would you mind letting us know what editing tools you use. I have been teaching online regularly and and have been using the standard recording features of zoom but I can’t edit at all. I know I can download the videos and edit them in another app but so far have not attempted to do this. Do you record and edit in the same app? Thank you for any recommendations you have time to share with me!

    • @DrTrefor
      @DrTrefor  2 роки тому +1

      I have this video!!! ua-cam.com/video/hmQd_P_qj1w/v-deo.html

  • @kalinaszek
    @kalinaszek 2 роки тому

    I love overleaf!

  • @mathematica5278
    @mathematica5278 2 роки тому +1

    Hey, Dr. Trefor Bazett Sir, Suppose we want to ignore one point on X axis that is function does not exist at that point. How to plot such graph? By the this video is very useful to complete my research paper. I hope you you will solve my asked question. Thank You

    • @DrTrefor
      @DrTrefor  2 роки тому +1

      I’d draw a little circle around that point, and exaggerate it to be finite notninfintessimal

    • @mathematica5278
      @mathematica5278 2 роки тому

      @@DrTrefor Actually sir, I have to draw a graph only on positive integers except primes. By the way this tutorial is useful for research. Thank You sir

  • @Linuxdirk
    @Linuxdirk Рік тому

    I really wish I had an actual use for LaTeX in my daily hobby or work life!

  • @ponsianoodongkara2473
    @ponsianoodongkara2473 2 роки тому

    Hello Dr Trefor, I thanks for your latex videos, I have learnt to use latex just from. I keep getting this error of white space during citations and I don’t know how to work on it, how can I fix it thanks

  • @dydx3741
    @dydx3741 2 роки тому +2

    sir please start a series on Linear Algebra ...here or on Udemy..... i want to learn it from you

    • @DrTrefor
      @DrTrefor  2 роки тому +3

      I already have a whole playlist on linear algebra! Check out my channel's homepage

    • @dydx3741
      @dydx3741 2 роки тому

      @@DrTrefor Thankyou so so much.... 😘

  • @sergekamga4512
    @sergekamga4512 Рік тому +1

    How did you add that yellow circle to your cursor or pointer?

  • @sathyendarsreepada4893
    @sathyendarsreepada4893 Рік тому

    Your videos are very informative and helpful, thank you. How do I create a legend for a column plot? Also, I couldn't get rid of a warning saying Underfull \hbox (badness 10000) in paragraph at lines so and so?

  • @kvnptl4400
    @kvnptl4400 2 роки тому +2

    BTW, why don't we use matplotlib and save fig as .SVG format and put it on latex? It's easy and more flexible as it is in Python.

    • @loopingdope
      @loopingdope 2 роки тому +1

      Ty, didnt know this was a possibility

    • @DrTrefor
      @DrTrefor  2 роки тому +3

      This is good! I love matplotlib! I think it depends on what precisely you are doing. So to me the advantages of using LaTeX are the ability to modify and maintain consistent formatting throughout the document (text in image changes with the rest of the document), as well as benefits of having a native graphing program that you can specify everything of using the same syntax you are using for the rest of your mathematical documents. But your mileage will definitely vary and if someone is really invested and familiar with any other software like matplotlib or matlab or whatever, that will mostly be fine!

    • @Rihanna8K
      @Rihanna8K 2 роки тому +1

      I can't use svg directly on LaTeX... does it need any special package?

    • @kvnptl4400
      @kvnptl4400 2 роки тому +2

      @@Rihanna8K you can use package: \usepackage{svg}
      \begin{figure}[H]
      \centering
      \def\svgscale{0.7}
      \includesvg[width= \textwidth \scale 10 ]{your_figure_name.svg}
      \caption{put_your_caption}
      \label{fig:some_name}
      \end{figure}

  • @audic2350
    @audic2350 2 роки тому

    I usually use gnuplot to plot graphs and then I screen it to my latex files...
    I think using your method is better

  • @s.l.2879
    @s.l.2879 2 роки тому +4

    Hey,
    I have been using tikz and pgfplot for a while now, but there is always something new to learn from your videos. Awesome! Using tikz for my plots is just so much better. No more pain with different fonts, fontsize etc. when including plots from other programs.
    Something worth mentioning is the externalize library, which helps with the long compilation times, especially when you are including experimental data or you just have a lot of figures , in overleaf you can get a compilation timeout really quick.
    One question of topic: I watched your video where you presented your own thesis and I really liked the font you were using. Do you remember which one it was and how to use it?

    • @DrTrefor
      @DrTrefor  2 роки тому +1

      Thank you and yes that is a very good trick with lots of plots! I don’t recall the font, but if you load the university of Toronto template it will be whatever it uses

  • @GuillermoGarcia75
    @GuillermoGarcia75 2 роки тому

    I'm an old time user of LaTex articles, resumes, etc....but , right now I'm not very comfortable with my presentations... pptxs are not my favourite type of document... any sugestions on making presentations with LaTex (static ones obviously)?
    .

  • @Radmud
    @Radmud 2 роки тому +1

    Is there an easy way to display two of these plots side by side? Optionally with captions similar to two side by side subfigures.

    • @DrTrefor
      @DrTrefor  2 роки тому +2

      Yup! Google mini page

  • @23ZeuZ23
    @23ZeuZ23 Рік тому +1

    If Matlab were free, would you still use LaTeX for graphics? Because there is Octave, and if we are talking about graphs, we are also talking about data generation and maybe complex operations, etc.

    • @DrTrefor
      @DrTrefor  Рік тому +2

      I like lots of graphics options, it just depends on what I’m trying to do.