All Questions
4 questions
1
vote
0
answers
209
views
Both latex and parameter values in python strings
I want to add a title to my plots (in matplotlib) which would display both parameters and their values, something like
f"$\alpha$ = {present value of alpha}, $\beta$ = {present value of beta}&...
3
votes
1
answer
876
views
f-string in yaxis.set_major_formatter
I have the following code:
import pandas as pd
from pandas import DataFrame as df
import matplotlib
from pandas_datareader import data as web
import matplotlib.pyplot as plt
import datetime
import ...
0
votes
2
answers
2k
views
What does the f do in plt.ylabel(f'g(x)')?
Firstly,
import matplotlib.pyplot as plt
import matplotlib
In an elementary example on how to plot with matplotlib in our lecture I encountered the following line
plt.ylabel(f'g(x)')
What I have ...
29
votes
1
answer
30k
views
How to display LaTeX f-strings in matplotlib [duplicate]
In Python 3.6, there is the new f-string to include variables in strings which is great, but how do you correctly apply these strings to get super or subscripts printed for matplotlib?
(to actually ...