Re: Toggling dark/light GUI mode / changing matplotlib style

Matthias Brennwald <[email protected]> Sat, 05 Mar 2022 09:07:18 +0100
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>
--=-J1JO3zTRypQUKW02fLcu
Content-Type: text/plain; charset="UTF-8"; format=flowed



On Fri, Mar 4 2022 at 22:24:17 -0600, Matt Newville 
<[email protected]> wrote:
> ... One of the things it supports is setting one of matplolib's color 
> themes (including many from seaborn).  This essentially sets the 
> matplotlib rcParams settings and sets the colors of the various plot 
> components.

Sure. That's exactly what I am already doing now (use rcParams to set 
the plot style). However, according to the matplotlib documentation, 
changing the plot styles (via rcParams) of an existing plot does not 
work. Setting the plot styles using rcParams will therefore only work 
at startup, when the figure is created, but it does not allow changing 
the plot style if the GUI light/dark mode is changed *after* the figure 
has been created.

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/6KI98R.C5S6WL3BNKGP1%40gmail.com.

--=-J1JO3zTRypQUKW02fLcu
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div id=3D"geary-body" dir=3D"auto"><div><br></div></div><div id=3D"geary-q=
uote" dir=3D"auto"><br>On Fri, Mar 4 2022 at 22:24:17 -0600, Matt Newville =
&lt;[email protected]&gt; wrote:<br><blockquote type=3D"cite"><div=
 dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-fa=
mily:arial,sans-serif">... One of the things it supports is setting one of =
matplolib's&nbsp;color themes (including many from seaborn).&nbsp; This ess=
entially sets the matplotlib rcParams settings and sets the colors of the v=
arious&nbsp;plot components.</div></div></div></blockquote><font face=3D"ar=
ial, sans-serif"><div><font face=3D"arial, sans-serif"><br></font></div><di=
v><font face=3D"arial, sans-serif">Sure. That's exactly what I am already d=
oing now (use rcParams to set the plot style). However, according to the ma=
tplotlib documentation, changing the plot styles (via rcParams) of an exist=
ing plot does not work. Setting the plot styles using rcParams will therefo=
re only work at startup, when the figure is created, but it does not allow =
changing the plot style if the GUI light/dark mode is changed *after* the f=
igure has been created.</font></div></font></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;wxPython-users&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">wxpy=
[email protected]</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/wxpython-users/6KI98R.C5S6WL3BNKGP1%40gmail.com?utm_medium=3Dema=
il&utm_source=3Dfooter">https://groups.google.com/d/msgid/wxpython-users/6K=
I98R.C5S6WL3BNKGP1%40gmail.com</a>.<br />

--=-J1JO3zTRypQUKW02fLcu--