Add math symbols to matplotlib figures with matplotlib LaTeX || Matplotlib Tips

Поделиться
HTML-код
  • Опубликовано: 7 авг 2024
  • Use matplotlib latex to show equations on a matplotlib figure. I demonstrate how to add symbols to the matplotlib title, annotations, legends, and axes labels. First I explain how to make matplotlib subscripts and superscripts with TeX as well as matplotlib Greek letters. Then I demo how to write matplotlib latex fractions and full equations on matplotlib. I also mention additional ways to use TeX with matplotlib to create accent marks, equation arrays, and additional font styles to write Big O notation, for example.
    0:00 Introduction
    0:36 Subscripts & Greek Letters
    3:20 Fractions & Equations
    4:52 More with TeX
    5:19 Conclusion
    Matplotlib Resource - List of TeX Symbols:
    matplotlib.org/tutorials/text...
    Github Code:
    github.com/kimfetti/Videos/bl...
    Related Videos:
    How to change the matplotlib FIGURE SIZE: • How to change the matp...
    How to SAVE a matplotlib figure: • How to save a matplotl...
    #matplotlib #dataviz #matplotlibtips
  • НаукаНаука

Комментарии • 41

  • @BrunoAraujo-po2lm
    @BrunoAraujo-po2lm 3 года назад +1

    Amazing job as allways Kimberly! Pls never stop creating videos, it's the best didatic I've found on youtube until now.

    • @KimberlyFessel
      @KimberlyFessel  3 года назад

      Wonderful! So glad you are enjoying the videos - I will keep making them!

  • @vishalagrawal7046
    @vishalagrawal7046 Год назад +1

    Super cool! Thanks Kim

  • @bec_Divyansh
    @bec_Divyansh Год назад

    A to the point video, absolutely loved it!

  • @golparijoon9622
    @golparijoon9622 4 месяца назад

    Awesome! short and extremely useful video that cannot be found anywhere else! thanks

  • @sumaal-hunaishi9810
    @sumaal-hunaishi9810 Год назад

    This was extremely helpful. Thank you!

  • @arnavbhavsar8567
    @arnavbhavsar8567 3 года назад

    Thank you so much for this video and please keep posting

    • @KimberlyFessel
      @KimberlyFessel  3 года назад

      Welcome! And yes, I think I will keep making videos - it's fun 😄

  • @swarnendusekharghosh9539
    @swarnendusekharghosh9539 3 года назад

    Thank you much for such useful videos .. do keep posting

    • @KimberlyFessel
      @KimberlyFessel  3 года назад

      Glad to hear they have been useful - cheers!

  • @bhoopendragupta4782
    @bhoopendragupta4782 2 года назад

    You saved my so much time 👍👍

  • @omar24191
    @omar24191 3 года назад

    thanks a lot Kimberly! 😘

  • @amanpatyal2187
    @amanpatyal2187 3 года назад

    very informative...👍👍

  • @EngineeringHooksets
    @EngineeringHooksets 2 года назад

    Thank you!

  • @naderbazyari2
    @naderbazyari2 7 месяцев назад

    Great video thanks a lot

  • @syedabuthahirkaz
    @syedabuthahirkaz 3 года назад

    Thank You.

  • @Space_A_S_M_R
    @Space_A_S_M_R 2 года назад

    thank you!

  • @danielrico3352
    @danielrico3352 2 года назад

    Great video! This video helped me a lot, however I have a question. For example, I made a program that solves a quadratic equation. At the beginning, the user must enter the values of a, b and c. Then the values of x1 and x2 are displayed. Finally, the graph of the parabola is shown. How can I print the specific a, b, c values in the title of my graph. For the moment I wrote: pyplot.title(r'$ax^2 + bx + c$') but instead of showing a, b and c, I would like it to show the values that the user entered. Thanks in advance!

  • @abcde7515
    @abcde7515 3 года назад

    Thank you

  • @rouro9915
    @rouro9915 3 года назад

    You're more understandable than my professor

  • @dinuandreea1847
    @dinuandreea1847 3 года назад

    Hi Kimberly. I tried to run the examples but I have some issues from latex. How did you install it? Thank you

    • @KimberlyFessel
      @KimberlyFessel  3 года назад

      Hmmm, I didn't need to install anything extra. I think TeX should come with your Matplotlib installation, though you may need to update your rcParams to activate it like what is done here: matplotlib.org/stable/tutorials/text/usetex.html

  • @aneedfortheory
    @aneedfortheory 2 месяца назад

    Great tutorial! However, my PDF output from matplotlib shows Greek letters that look badly formatted. How can I correct for this?

    • @KimberlyFessel
      @KimberlyFessel  Месяц назад

      Thanks! I'm not sure exactly what you're seeing. I don't remember having problems with this in the past. So my only guess that I might try is saving as a SVG file instead of a PDF and converting it later.

  • @TheDavidyisus
    @TheDavidyisus 3 года назад

    Can you help me?
    I need change the font of titles, labels and tick labels but i don't know how i have to do that :(

    • @KimberlyFessel
      @KimberlyFessel  3 года назад

      Hi there - you have may options to change the fonts of your titles, labels, and tick labels. You need to change the font type (Courier, Arial, etc)? You can update this using the keyword "fontname" within plt.title(), plt.xlabel(), and so on. Or you could change the size with "fontsize" or switch the "fontweight" to bold, say. Here is a list of options for any text properties including titles, labels, and tick labels: matplotlib.org/stable/tutorials/text/text_props.html

  • @frankfrank5042
    @frankfrank5042 3 года назад

    Über cool :)

  • @nsnilesh604
    @nsnilesh604 3 года назад

    How to write many annotations and adjust location automatically in matplotlib graph

    • @KimberlyFessel
      @KimberlyFessel  3 года назад

      Hey there - so glad you asked this question. I just heard about a new library called adjustText (github.com/Phlya/adjustText), and I'm planning to make a video demoing it very soon!

  • @shubhamtalks9718
    @shubhamtalks9718 3 года назад

    Can you pls share you learning process in a video?

    • @KimberlyFessel
      @KimberlyFessel  3 года назад

      Hi there - I put together this "Data Visualization Thought Process" video that might be helpful: ruclips.net/video/fbG5odHUHSc/видео.html Is that the type of learning process you were looking for?

    • @shubhamtalks9718
      @shubhamtalks9718 3 года назад

      @@KimberlyFessel Thank you but I am looking for a video where suppose you don't know about a plot. Then how do you go about learning all the aspects of that plot.