-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed as not planned
Labels
OS: ApplePerformancestatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Actiontopic: text/usetex
Description
When usetex=True
plotting is a lot slower than the normal.
I generated a simple testplot with some mathtex and timed the rendering time with usetex=True
and usetex=False
for both saving the plot and just displaying it:
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
%matplotlib inline
x = np.linspace(0, 20, 500)
y = 3 * x + 0.5 * x**3 + 2
def plot(x, y):
plt.plot(x, y)
plt.title('simple testplot')
plt.xlabel('$x$')
plt.ylabel(r'$3 x + \frac{1}{2} x^3 + 2$')
plt.savefig('test.pdf')
%timeit -n 1 -r 1 plot(x, y)
Here are the measurements:
- save pdf
usetex=False
: 351 ms - save pdf
usetex=True
: 8.34 s - display
usetex=False
: 39 ms - display
usetex=True
: 38.3 ms but it took approx. 7 s until the plot was displayed
My system is running Mac OS X 10.10.4, matplotlib 1.4.3 and the latest LaTeX version.
tdegeus and nimonian
Metadata
Metadata
Assignees
Labels
OS: ApplePerformancestatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Actiontopic: text/usetex