Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: latex required for PDF plotting? #6104

Closed
dacoex opened this issue Mar 3, 2016 · 13 comments
Closed

docs: latex required for PDF plotting? #6104

dacoex opened this issue Mar 3, 2016 · 13 comments
Milestone

Comments

@dacoex
Copy link
Contributor

dacoex commented Mar 3, 2016

Plotting to pdf this error occurs:

RuntimeError: LaTeX was not able to process the following string:
b'lp'
Here is the full report generated by LaTeX: 

Is is latex a requirement for backend_pdf?

Nothing mentioned on:
http://matplotlib.org/api/backend_pdf_api.html

Or is it possible to plot into multipage documents without latex?

@WeatherGod
Copy link
Member

It should not be required unless there are settings that turns it on. Do
you set "usetex=True" anywhere? Perhaps it is in your matplotlibrc file?

On Thu, Mar 3, 2016 at 10:48 AM, DaCoEx notifications@github.com wrote:

Plotting to pdf this error occurs:

RuntimeError: LaTeX was not able to process the following string:
b'lp'
Here is the full report generated by LaTeX:

Is is latex a requirement for backend_pdf?

Nothing mentioned on:
http://matplotlib.org/api/backend_pdf_api.html

Or is it possible to plot into multipage documents without latex?


Reply to this email directly or view it on GitHub
#6104.

@dacoex
Copy link
Contributor Author

dacoex commented Mar 3, 2016

Thanks for the reply.

I am using WinPython

in
WinPython-64bit-3.4.4.1Qt5/$_OUTDIR/python-3.4.4.amd64/Lib/site-packages/matplotlib/mpl-data/matplotlibrc
there is:
#text.usetex : False # use latex for all text handling. The following fonts

Would you see it as good to add this hint somewhere in the docs?
Also maybe for WinPython?

@WeatherGod
Copy link
Member

Hmm, that would indicate that latex isn't supposed to be used. Perhaps the
full traceback of the original exception and the code to reproduce the
problem?

I should point out that WinPython is a bit weird. What they do is package
various projects from their master branch at arbitrary times. So, while it
gives you near-bleeding-edge versions of various projects, it may also
include bugs that never made it out in a release. This can make debugging
difficult.

On Thu, Mar 3, 2016 at 1:22 PM, DaCoEx notifications@github.com wrote:

Thanks for the reply.

I am using WinPython https://winpython.github.io/

in

WinPython-64bit-3.4.4.1Qt5/$_OUTDIR/python-3.4.4.amd64/Lib/site-packages/matplotlib/mpl-data/matplotlibrc

there is:
#text.usetex : False # use latex for all text handling. The following fonts

Would you see it as good to add this hint somewhere in the docs?
Also maybe for WinPython https://winpython.github.io/?


Reply to this email directly or view it on GitHub
#6104 (comment)
.

@dacoex
Copy link
Contributor Author

dacoex commented Mar 3, 2016

Hmm, that would indicate that latex isn't supposed to be used. Perhaps the full traceback of the original exception and the code to reproduce the problem?
No, but about the default value in the rc file, i.e. where to check if someone gets the same error.

Something like:
If PDF save does not work, check the rc setting usetex in file...

@dacoex
Copy link
Contributor Author

dacoex commented Mar 3, 2016

I should point out that WinPython is a bit weird. What they do is package various projects from their master branch at arbitrary times.
This can make debugging difficult.

I am using it because run into the dependency circle with anaconda. But yes, will convince IT dept. to reinstall that distro.

@WeatherGod
Copy link
Member

I think you are missing the point of what I am saying. First, I am not
suggesting that WinPython should be reinstalled. Reinstalling it may or may
not solve your problem. I only point out that it is a bleeding edge distro,
so it has inherent problems. Second, what you are encountering seems to be
a bug of some sort. What you are suggesting as a documentation change isn't
correct. Having usetex=True somewhere and missing latex would cause
problems for any output format, not just PDFs.

Have you found a place where usetex was set to True? So far, all I have
seen is that it is False. If there is no place where usetex is True, then
there is a bug. It would help immensely to have the full traceback of the
exception, and example code that produces your problem.

On Thu, Mar 3, 2016 at 1:44 PM, DaCoEx notifications@github.com wrote:

I should point out that WinPython is a bit weird. What they do is package
various projects from their master branch at arbitrary times.
This can make debugging difficult.
I am using it because run into the dependency circle with anaconda. But
yes, will convince IT dept. to reinstall that distro.


Reply to this email directly or view it on GitHub
#6104 (comment)
.

@dacoex
Copy link
Contributor Author

dacoex commented Mar 3, 2016

I think you are missing the point of what I am saying. First, I am not suggesting that WinPython should >be reinstalled. Reinstalling it may or may not solve your problem.

Sorry, I was not explicit enough. I meant reinstall Anaconda some time.

Have you found a place where usetex was set to True?

Only the line cited above.

It would help immensely to have the full traceback of the
exception, and example code that produces your problem.

I run this code:
pylab_examples example code: multipage_pdf.py — Matplotlib 1.5.1 ...

@WeatherGod
Copy link
Member

The line you point out was commented out. Where was it explicitly set to
True?

On Thu, Mar 3, 2016 at 2:01 PM, DaCoEx notifications@github.com wrote:

I think you are missing the point of what I am saying. First, I am not
suggesting that WinPython should >be reinstalled. Reinstalling it may or
may not solve your problem.

Sorry, I was not explicit enough. I meant reinstall Anaconda some time.

Have you found a place where usetex was set to True?

Only the line cited above.

It would help immensely to have the full traceback of the
exception, and example code that produces your problem.

I run this code:
pylab_examples example code: multipage_pdf.py — Matplotlib 1.5.1 ...
http://matplotlib.org/examples/pylab_examples/multipage_pdf.html


Reply to this email directly or view it on GitHub
#6104 (comment)
.

@WeatherGod
Copy link
Member

Ah-ha! That example explicitly sets usetex to True:

plt.rc('text', usetex=True)

On Thu, Mar 3, 2016 at 2:12 PM, Benjamin Root ben.v.root@gmail.com wrote:

The line you point out was commented out. Where was it explicitly set to
True?

On Thu, Mar 3, 2016 at 2:01 PM, DaCoEx notifications@github.com wrote:

I think you are missing the point of what I am saying. First, I am not
suggesting that WinPython should >be reinstalled. Reinstalling it may or
may not solve your problem.

Sorry, I was not explicit enough. I meant reinstall Anaconda some time.

Have you found a place where usetex was set to True?

Only the line cited above.

It would help immensely to have the full traceback of the
exception, and example code that produces your problem.

I run this code:
pylab_examples example code: multipage_pdf.py — Matplotlib 1.5.1 ...
http://matplotlib.org/examples/pylab_examples/multipage_pdf.html


Reply to this email directly or view it on GitHub
#6104 (comment)
.

@dacoex
Copy link
Contributor Author

dacoex commented Mar 3, 2016

OK, you are right. with
plt.rc('text', usetex=False)

works nicely.

In case this happens to others, a hint could be added to:
http://matplotlib.org/api/backend_pdf_api.html

Sorry for this confusion and for wasting your time. And thanks for your help.

@dacoex dacoex closed this as completed Mar 3, 2016
@WeatherGod
Copy link
Member

The hint could be added to the comments for the example. This has nothing
to do with the pdf backend.

It wasn't a waste of time. It revealed a bad assumption in some of our
examples.

On Thu, Mar 3, 2016 at 3:16 PM, DaCoEx notifications@github.com wrote:

OK, you are right. with
plt.rc('text', usetex=False)

works nicely.

In case this happens to others, a hint could be added to:
http://matplotlib.org/api/backend_pdf_api.html

Sorry for this confusion and for wasting your time. And thanks for your
help.


Reply to this email directly or view it on GitHub
#6104 (comment)
.

dacoex pushed a commit to dacoex/matplotlib that referenced this issue Mar 4, 2016
@dacoex
Copy link
Contributor Author

dacoex commented Mar 4, 2016

OK, as consequence of your last comment I change the example.

@dacoex dacoex reopened this Mar 4, 2016
dacoex added a commit to dacoex/matplotlib that referenced this issue Mar 6, 2016
dacoex added a commit to dacoex/matplotlib that referenced this issue Mar 7, 2016
@QuLogic QuLogic added this to the 2.1 (next point release) milestone May 22, 2016
@QuLogic
Copy link
Member

QuLogic commented May 22, 2016

Fixed by #6119.

@QuLogic QuLogic closed this as completed May 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants