-
Notifications
You must be signed in to change notification settings - Fork 43
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
LaTeX plots #14
Comments
Hi Joris, Thanks for getting in touch! The code is designed so that it picks up on whether you have text.usetex enabled in matplotlibrc and acts accordingly. So if you turn off latex processing it should automatically stop trying to use it, and replace the axis labels with non-latex versions. That said, it's not exactly well tested functionality, so let me know if you have trouble. Cheers, |
Hi Adam, That's convenient! But I think I have text.usetex turned off in the default matplotlib rcParams, and even when setting it to False explicitly (as in the below code snippet), the error persists?
Let me know if you can think of a reason why this would be. (For completeness, I have set up a conda environment with python version 3.7.10, matplotlib version 3.3.4, having installed bagpipes 0.8.5 through pip.) Cheers, |
Hi Joris, Hmm, ok I just looked back at the code (lines 17-20 of bagpipes/plotting/general.py) and it looks like the way I implemented turning latex on or off was to check whether there's an executable called latex in your environment. This will overwrite text.usetex, which isn't ideal, I should probably change the way this is done. Can you try changing lines 105 and 106 in that file to turn latex off even if there's a latex distribution in your path, and see if that fixes it? I have a vague memory of getting this error before, but it might just be the power of suggestion. I think perhaps the solution was to re-install latex. I googled "b'lp' error python" and found some useful threads. One suggestion seems to be that you're missing dvipng? Cheers, |
Hi Adam, Setting Yes, that's what I read, too – but as far as I can tell, dvipng should come with the MiKTeX installation, and its executable is located in Cheers, |
Good good, yeah I'm forever having trouble with latex installations, good luck sorting it! |
I still see that Bagpipes turns on LaTeX when plotting even if I do not have it turned on in my standard environment. Could it be set to not turn it on by default and then only do so when explicitly asked to, in accordance with the principle of least surprise? |
Yes, I should get round to fixing this as I said I would. I've reopened this issue to remind myself. |
When using the plotting functions, I run into the following problem:
I'm aware this is an issue with my local LaTeX distribution (MiKTeX in my case), but a few Google searches have not solved the problem yet (all executables of LaTeX, Ghostscript, and dvipng are in
/usr/local/bin
which is included in PATH). Is there a way to turn off plotting with TeX to overcome the problem?The text was updated successfully, but these errors were encountered: