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 Наука
Amazing job as allways Kimberly! Pls never stop creating videos, it's the best didatic I've found on youtube until now.
Wonderful! So glad you are enjoying the videos - I will keep making them!
Super cool! Thanks Kim
A to the point video, absolutely loved it!
Awesome! short and extremely useful video that cannot be found anywhere else! thanks
Cheers! 👍
This was extremely helpful. Thank you!
Thank you so much for this video and please keep posting
Welcome! And yes, I think I will keep making videos - it's fun 😄
Thank you much for such useful videos .. do keep posting
Glad to hear they have been useful - cheers!
You saved my so much time 👍👍
thanks a lot Kimberly! 😘
You are most welcome - cheers!
very informative...👍👍
Glad it was helpful!
Thank you!
Great video thanks a lot
Thanks! Glad you liked it.
Thank You.
Welcome!
thank you!
Most welcome - cheers!
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!
Thank you
Most welcome! 😄
You're more understandable than my professor
Thank you!
Hi Kimberly. I tried to run the examples but I have some issues from latex. How did you install it? Thank you
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
Great tutorial! However, my PDF output from matplotlib shows Greek letters that look badly formatted. How can I correct for this?
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.
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 :(
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
Über cool :)
Haha -- nice! 😄
How to write many annotations and adjust location automatically in matplotlib graph
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!
Can you pls share you learning process in a video?
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?
@@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.