SNEWS2 / snewpy

A Python package for working with supernova neutrinos
https://snewpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
26 stars 19 forks source link

text.usetex : True clashes with examples #147

Open PeterDenton opened 2 years ago

PeterDenton commented 2 years ago

I have "text.usetex : True" in my matplotlibrc file. In the examples there are strings of text which sometimes have underscores, derived from file names. While this is only for an example and is technically my fault, it probably isn't a super uncommon scenario. An easy fix is to put "mpl.rcParams['text.usetex'] = False" in the plotting examples if you want.

JostMigenda commented 2 years ago

This sounds like a reasonable request to me. But before we go ahead and manually edit every single one of the many example notebooks and scripts included in SNEWPY, it’s probably worth taking a moment to think: Are there any other common settings that we should take into account? (And if so, is it worth creating a custom style sheet for SNEWPY?)

PeterDenton commented 2 years ago

I thought about a custom style sheet too, but I only suggested turning usetex off because that was the only one that broke the examples that I could think of. My other things might change how the plots look, but at least they would be generated. But trying to write a string "asdf_jkl" without dollar signs around it will make matplotlib a bit upset and throw a bunch of latex garbage in the terminal.