<p dir="ltr">I am not sure that this was an intentional change.</p>
<p dir="ltr">In either case, the ability to control this not via rcparams is clearly a good idea.</p>
<p dir="ltr">Tom</p>
<br><div class="gmail_quote"><div dir="ltr">On Tue, May 31, 2016, 22:13 Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think I'm going to work around this by wrapping the places where we draw matplotlib figures with context managers for the classic style, making use of matplotlib.style.context. We only draw figures in a few places, so it's a lot less invasive to use the context manager than I originally feared. Specifying the style exactly should also make it easier for us to avoid issues due to people's local matplotlib settings.<div><br><div>As far as I can see, the font used for mathtext rendering can only be controlled by the mathtext.fontset rcparam (see the function MathTextParser.parse). Since I liked the old default - computer modern - I never noticed that it wasn't possible to control it via the object oriented API. </div><div><br></div><div>I'm going to close the issue I linked to in the OP and instead open a feature request issue asking for a way to control the font of mathtext without messing with the rcparam system. Maybe it would also make sense for the font chosen for mathtext to try to match the font given by the FontProperties instance - for example, switching to a serif font if the FontProperties for the Text instance correspond to a serif font.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 31, 2016 at 5:51 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>This is in reference to an issue I opened today:</div><div><br></div><div><a href="https://github.com/matplotlib/matplotlib/issues/6514#issuecomment-222833315" target="_blank">https://github.com/matplotlib/matplotlib/issues/6514#issuecomment-222833315</a><br></div><div><br></div><div>Is there a way to tell the mathtext renderer to use the computer modern font that used to be the default? I know I can do this via the mathtext.fontset rcparam, but this is in the context of a library that depends on matplotlib, so I'd prefer a way to do this without overriding any rcparams a user has set already.</div><div><br></div><div>For non-mathtext text, this is easy, I just need to set the FontProperties instance associated with the Text object. However, there doesn't seem to be a way to do something similar for mathtext.</div><div><br></div><div>Thanks for your help,</div><div><br></div><div>Nathan</div></div>
</blockquote></div><br></div>
_______________________________________________<br>
Matplotlib-devel mailing list<br>
<a href="mailto:Matplotlib-devel@python.org" target="_blank">Matplotlib-devel@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-devel" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-devel</a><br>
</blockquote></div>