garrettj403 / SciencePlots

Matplotlib styles for scientific plotting
MIT License
7.12k stars 709 forks source link

[Help Request]: "No pages of output" issue #100

Closed forgetmenot9911 closed 1 year ago

forgetmenot9911 commented 1 year ago

Environment

System: Windows-10-10.0.19045-SP0
Python: 3.10.9 | packaged by conda-forge | (main, Feb  2 2023, 20:14:58) [MSC v.1929 64 bit (AMD64)]
SciencePlots: 2.1.0
Matplotlib: 3.4.3
Latex distro: (populate manually)

Describe your issue here

Hello! I use "TexStudio + MikTex". When I run plt.style.use('science'), a RuntimeError comes:

CalledProcessError: Command '['latex', '-interaction=nonstopmode', '--halt-on-error', 'C:\\Users\\WangYucheng\\.matplotlib\\tex.cache\\a778062c3a44980941faeea610f484c4.tex']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

RuntimeError                              Traceback (most recent call last)
...
No pages of output.
Transcript written on a778062c3a44980941faeea610f484c4.log.

How can we reproduce it? What have you tried?

I use jupyter notebook in vscode.

Extra info

No response

dcschaper commented 1 year ago

I am also running into this issue (except pdflatex and vscode). I haven't found the solution yet, but I wanted to echo this same problem here.

echedey-ls commented 1 year ago

Seems like a problem related to using matplotlib and latex (i.e., unrelated to scienceplots). A quick google search shows this. Please have a look and let us know if that works.

BTW, "How can we reproduce it? What have you tried?" usually expects instructions and code, not a brief description of the tools you use.

Hwenshuo commented 1 year ago

I also met the same problem and successfully solved by the method given in the link, thanks a lot!

echedey-ls commented 1 year ago

Thanks for letting us know! :heart:

lucasresck commented 1 year ago

Seems like a problem related to using matplotlib and latex (i.e., unrelated to scienceplots). A quick google search shows this.

Thank you for the reference! Worked like a charm 😊

Just for the ease of other users, the solution is running the following:

sudo apt install cm-super