Re: [sage-devel] Matplotlib plotting style 'classic' hardcoded to Sage

2018-07-10 Thread Eric Gourgoulhon
HI,

Le lundi 9 juillet 2018 12:53:24 UTC+2, Kwankyu Lee a écrit :
>
> Consulting 
>
> https://matplotlib.org/users/dflt_style_changes.html
>
> we may keep specifically only the math font of the classic style by:
>
> mpl.rcParams['mathtext.fontset'] = 'cm'
> mpl.rcParams['mathtext.rm'] = 'serif'
>
> and adopt the default matplotlib-2 style generally. 
>

Indeed this would be a good solution. Without it, the math output is really 
ugly, as shown in this example. 

IIRC, this was the main reason to set the default style to 'classic' while 
upgrading to Matplotlib 2.1.
Let me stress that when using Jupyter notebooks with %display latex, it is 
nice to have exactly the same fonts in legend labels of plots as in MathJax 
outputs.

Best wishes,

Eric.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Matplotlib plotting style 'classic' hardcoded to Sage

2018-07-09 Thread Kwankyu Lee
Consulting 

https://matplotlib.org/users/dflt_style_changes.html

we may keep specifically only the math font of the classic style by:

mpl.rcParams['mathtext.fontset'] = 'cm'
mpl.rcParams['mathtext.rm'] = 'serif'

and adopt the default matplotlib-2 style generally. I assume that the 
matplotlib-2 style is an improvement over the classic style in general.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Matplotlib plotting style 'classic' hardcoded to Sage

2018-07-09 Thread François Bissey
Generally equations look better with the font choices in the “classic” style 
which was
the default before matplotlib-2.


> On 9/07/2018, at 20:34, Kwankyu Lee  wrote:
> 
> Yeah, I found one thing that looks ugly on my machine:
> 
> In the 'classic' style:
> 
> 
> In the current default style:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Matplotlib plotting style 'classic' hardcoded to Sage

2018-07-09 Thread Kwankyu Lee
Yeah, I found one thing that looks ugly on my machine:

In the 'classic' style:



In the current default style: 













-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Matplotlib plotting style 'classic' hardcoded to Sage

2018-07-09 Thread Kwankyu Lee


On Monday, July 9, 2018 at 10:40:03 AM UTC+9, François Bissey wrote:
>
> I am sorry to have introduced that in the upgrade to matplotlib 2.1. 
> Hardcoding 
> was easier than setting the style to classic for every calls for the 
> documentation. 
> The reports I had was that the default style from 2.1 onwards made the 
> documentation 
> plots look ugly. 


I looked through the documentation rebuilt with the current default style. 
It still looks great, and I find nothing ugly :-)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Matplotlib plotting style 'classic' hardcoded to Sage

2018-07-08 Thread François Bissey
I am sorry to have introduced that in the upgrade to matplotlib 2.1. Hardcoding
was easier than setting the style to classic for every calls for the 
documentation.
The reports I had was that the default style from 2.1 onwards made the 
documentation
plots look ugly.

François

> On 9/07/2018, at 13:36, Kwankyu Lee  wrote:
> 
> Hi,
> 
> This ticket
> 
> https://trac.sagemath.org/ticket/25799
> 
> aims to remove matplotlib style 'classic' hardcoded into Sage. This makes 
> customization through the matplotlibrc file work, which fails presently.
> 
> After the ticket merged, the default matplotlib styles would be applied to 
> all Sage graphics, and Sage graphics may look subtly different than what you 
> have been used to. If you don't like this, then raise your voice to the 
> ticket. 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.