All Questions
9
questions
1
vote
0
answers
282
views
Matplotlib same LaTeX format for text and float-to-string part
I am trying to work on the legend of my graph:
As you can see that I used the dollar symbol for timestep to make it latex (I hope I am not wrong) but I am unable to get the same font/format for the ...
6
votes
0
answers
1k
views
How to get leading whitespace in matplotlib labels (legend or xlabel etc.) using latex?
I would like to insert some leading whitespace into some of my legend labels (problem is the same for other types of labels) with latex turned on. However, any leading whitespace that I enter is being ...
2
votes
0
answers
268
views
Matplotlib Output Legend box has wrong size in PGF output
currently, I'm struggling with an odd problem which occurs when exporting a matplotlib figure to PGF. As seen in the screenshot (from my LaTeX document), the output has a corrupted legend ...
2
votes
1
answer
413
views
Python matplotlib internal latex rendering has non-uniform legend label spacing?
Using the latex symbol for a right arrow (\rightarrow) for legend labels, with the internal latex rendering in matplotlib, adjusts the line spacing between label entries; see the minimal example below,...
1
vote
2
answers
2k
views
Latex \phantom command not rendering in matplotlib legend
I am having trouble getting the \phantom and \quad LaTeX commands to work in a legend label in matplotlib.
Ideally I would like the 'PREV. < 15%' to be aligned with the label below such that the '...
0
votes
0
answers
630
views
Changing the colour of amssymb symbols inside a matplotlib legend
I would like to use LaTeX (don't want unicode, as I need LaTeX for other purposes as well) in order to include coloured amssymb symbols (the same as the markers in my main plot) in the text of the ...
2
votes
2
answers
1k
views
Latex script in matplotlib
I wish to use latex script $\theta$ for labelling the axes and legends in matplotlib figure. So I use the following piece of code.
y = np.linspace(0, 2*np.pi, 200)
plt.plot(y, np.sin(y)*np.cos(y), lw=...
2
votes
1
answer
9k
views
Greek nu (Tex) in matplotlib legend
I'm plotting with matplotlib.pyplot and I am trying to use the Tex \nu letter in a plot label.
However, with label='$B_\nu(\nu, T)$', I get linebreak+u in the plot legend, since \n is interpreted as a ...
1
vote
1
answer
3k
views
How can I write a piecewise function latex code in Matplotlib?
I want write in the legend section of matplotlib a piecewise expression like this:
\[f(x) = \left\{
\begin{array}{lr}
x^2 & : x < 0\\
x^3 & : x \ge 0
\end{array}
\right.
\]
...