<h3 dir="auto">Bug summary</h3>
<p dir="auto">After creating a figure with multiple lines plotted using the plt.loglog() command, altering the linestyle in the plot window under Figure Options -&gt; Curves, results in some lines being swapped.</p>
<h3 dir="auto">Code for reproduction</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
import numpy as np

Ns = np.array([10, 20, 40, 80])
errors_fd = np.array([1.30069562e-17, 1.83972081e-17, 2.66824646e-16, 8.61976660e-16])
errors_dd = np.array([8.67886156e-12, 1.57381890e-11, 1.35584771e-08, 4.95264847e-06])
errors_operator = np.array([8.67888088e-12, 1.57381914e-11, 1.35584771e-08, 4.95264847e-06])
errors_rb = np.array([5.49503157e-06, 4.64897012e-06, 4.06345733e-06, 6.20409921e-06])


plt.loglog(Ns, errors_fd, label=&quot;Finite Difference&quot;, linestyle=&quot;-.&quot;, marker=&quot;.&quot;)
plt.loglog(Ns, errors_dd, label=&quot;Domain Decomposition&quot;, linestyle=&quot;-&quot;, marker=&quot;x&quot;)
plt.loglog(Ns, errors_operator, label=&quot;Exact Poincaré-Steklov&quot;, linestyle=&quot;-.&quot;, marker=&quot;.&quot;)
plt.loglog(Ns, errors_rb, label=&quot;Reduced Basis&quot;, linestyle=&quot;-.&quot;, marker=&quot;.&quot;)
plt.loglog(Ns, 1/Ns**2, label=&quot;Reference quadratic&quot;)
plt.xlabel(&quot;$N$ (number of disretisation points)&quot;)
plt.ylabel(&quot;$L^2$-error&quot;)
plt.grid()
plt.legend()
plt.title(&quot;$L^2$-error of numerical methods&quot;)

plt.show()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>

<span class="pl-v">Ns</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">10</span>, <span class="pl-c1">20</span>, <span class="pl-c1">40</span>, <span class="pl-c1">80</span>])
<span class="pl-s1">errors_fd</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1.30069562e-17</span>, <span class="pl-c1">1.83972081e-17</span>, <span class="pl-c1">2.66824646e-16</span>, <span class="pl-c1">8.61976660e-16</span>])
<span class="pl-s1">errors_dd</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">8.67886156e-12</span>, <span class="pl-c1">1.57381890e-11</span>, <span class="pl-c1">1.35584771e-08</span>, <span class="pl-c1">4.95264847e-06</span>])
<span class="pl-s1">errors_operator</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">8.67888088e-12</span>, <span class="pl-c1">1.57381914e-11</span>, <span class="pl-c1">1.35584771e-08</span>, <span class="pl-c1">4.95264847e-06</span>])
<span class="pl-s1">errors_rb</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">5.49503157e-06</span>, <span class="pl-c1">4.64897012e-06</span>, <span class="pl-c1">4.06345733e-06</span>, <span class="pl-c1">6.20409921e-06</span>])


<span class="pl-s1">plt</span>.<span class="pl-en">loglog</span>(<span class="pl-v">Ns</span>, <span class="pl-s1">errors_fd</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">"Finite Difference"</span>, <span class="pl-s1">linestyle</span><span class="pl-c1">=</span><span class="pl-s">"-."</span>, <span class="pl-s1">marker</span><span class="pl-c1">=</span><span class="pl-s">"."</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">loglog</span>(<span class="pl-v">Ns</span>, <span class="pl-s1">errors_dd</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">"Domain Decomposition"</span>, <span class="pl-s1">linestyle</span><span class="pl-c1">=</span><span class="pl-s">"-"</span>, <span class="pl-s1">marker</span><span class="pl-c1">=</span><span class="pl-s">"x"</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">loglog</span>(<span class="pl-v">Ns</span>, <span class="pl-s1">errors_operator</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">"Exact Poincaré-Steklov"</span>, <span class="pl-s1">linestyle</span><span class="pl-c1">=</span><span class="pl-s">"-."</span>, <span class="pl-s1">marker</span><span class="pl-c1">=</span><span class="pl-s">"."</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">loglog</span>(<span class="pl-v">Ns</span>, <span class="pl-s1">errors_rb</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">"Reduced Basis"</span>, <span class="pl-s1">linestyle</span><span class="pl-c1">=</span><span class="pl-s">"-."</span>, <span class="pl-s1">marker</span><span class="pl-c1">=</span><span class="pl-s">"."</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">loglog</span>(<span class="pl-v">Ns</span>, <span class="pl-c1">1</span><span class="pl-c1">/</span><span class="pl-v">Ns</span><span class="pl-c1">**</span><span class="pl-c1">2</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">"Reference quadratic"</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">xlabel</span>(<span class="pl-s">"$N$ (number of disretisation points)"</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">ylabel</span>(<span class="pl-s">"$L^2$-error"</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">grid</span>()
<span class="pl-s1">plt</span>.<span class="pl-en">legend</span>()
<span class="pl-s1">plt</span>.<span class="pl-en">title</span>(<span class="pl-s">"$L^2$-error of numerical methods"</span>)

<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<h3 dir="auto">Actual outcome</h3>
<p dir="auto">Outcome plot:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/19654849/162746305-15b5019f-fa8b-4008-900d-a5ff041fa5ff.png"><img src="https://user-images.githubusercontent.com/19654849/162746305-15b5019f-fa8b-4008-900d-a5ff041fa5ff.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">After changing the linestyle of the "Domain Decomposition" line to dotted:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/19654849/162746474-270985c7-6425-40f0-a460-4eda91e1878b.png"><img src="https://user-images.githubusercontent.com/19654849/162746474-270985c7-6425-40f0-a460-4eda91e1878b.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Expected outcome</h3>
<p dir="auto">I would expect that the "Finite Difference" line and the line of "Domain Decomposition" to not swap places in the graph.</p>
<h3 dir="auto">Additional information</h3>
<p dir="auto">I have edited figures before and this is the first time this bug occurs for me.<br>
I am on quite a new version of Python using the virtual environment provided by PyCharm Community Edition (Installed using Flatpak). I also run my code from within there.</p>
<h3 dir="auto">Operating system</h3>
<p dir="auto">Fedora Workstation 35</p>
<h3 dir="auto">Matplotlib Version</h3>
<p dir="auto">3.5.1</p>
<h3 dir="auto">Matplotlib Backend</h3>
<p dir="auto">Backend QtAgg is interactive backend. Turning interactive mode on. Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. Gtk-Message: 15:12:47.821: Failed to load module "canberra-gtk-module" Gtk-Message: 15:12:47.821: Failed to load module "pk-gtk-module" Gtk-Message: 15:12:47.821: Failed to load module "canberra-gtk-module" Gtk-Message: 15:12:47.822: Failed to load module "pk-gtk-module" QtAgg</p>
<h3 dir="auto">Python version</h3>
<p dir="auto">Python 3.9.9</p>
<h3 dir="auto">Jupyter version</h3>
<p dir="auto">Not installed</p>
<h3 dir="auto">Installation</h3>
<p dir="auto">pip</p>
<h3 dir="auto">Bug summary</h3>
<p dir="auto">I am trying to plot stacked bar chart. I have already defined python dictionary mapping key to specific color. The problem I am getting is, color is not consistent while plotting the chart. when I do console print for same key, it shows correct color but chart shows different color. Also, height of the bar seems to be overlapped even having same number and kept it as "center".</p>
<h3 dir="auto">Code for reproduction</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
import random
import numpy as np
import matplotlib

random.seed(0)

FIG_SIZE = (50, 25)
FONT_SZ = 30

font = {'weight' : 'bold',
        'size'   : FONT_SZ}

matplotlib.rc('font', **font)

dict = {'AL': {'ALF': 1,
       'CB': 1,
       'CC': 2,
       'HBBN': 6,
       'N7': 6,
       'PW': 2,
       'PA': 4,
       'PE': 3,
       'PPC': 2,
       'TI': 15},
'ALF': {'AL': 2,
        'PE': 6,
        'PET': 13},
'CB': {'N7': 1,
       'PA': 16},
'CC': {'AE': 1,
       'AL': 30,
       'PW': 1,
       'PA': 27,
       'ST': 1},
'PW': {'AL': 33,
       'ALF': 4,
       'CC': 6,
       'HBBC': 1,
       'PA': 4,
       'PC': 9,
       'PE': 8,
       'PET': 4,
       'PWC': 8},
'PC': {'AL': 4,
       'PW': 1,
       'PA': 1,
       'PWC': 1},
'PE': {'AL': 8,
       'ALF': 3,
       'HBBC': 1,
       'HBBN': 2,
       'N7': 2,
       'PBC': 1,
       'PWC': 12,
       'PPL': 1},
'PPC': {'AL': 14,
        'CC': 7,
        'PA': 1},
'PPB': {'N7': 6,
        'PC': 3,
        'ST': 6},
'TE': {'AL': 20,
       'CC': 46,
       'PA': 3,
       'PE': 1},
'TI': {'AL': 101,
       'CC': 2,
       'HC': 1,
       'N7': 2,
       'PW': 2,
       'PA': 5,
       'PC': 6,
       'PWC': 2,
       'PPC': 4,
       'PPL': 4}}

colors = [
    'AliceBlue', 'Chartreuse', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque',
    'BlanchedAlmond', 'BlueViolet', 'BurlyWood', 'CadetBlue', 'AntiqueWhite'
]

klass_names = dict.keys()

random.shuffle(colors)

klass_color_dict = {}
legend_dict = {}

fig, ax = plt.subplots(figsize=FIG_SIZE)

for klass in klass_names:
    col = random.choice(colors)
    while col in klass_color_dict.values():
        col = random.choice(colors)
    klass_color_dict[klass] = col

for klass in klass_names:
    for subklass in dict[klass].keys():
            color = klass_color_dict.get(subklass)
            label=subklass
            if legend_dict.get(label, 0) == 0:
                legend_dict[label] = 1
            else:
                label = &quot;&quot;
            p1 = ax.bar(x=klass, height=dict[klass][subklass], color=color, label=label)
            ax.bar_label(p1, label_type='center')
            print(klass, subklass, color)

plt.savefig(&quot;plt.jpeg&quot;)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">import</span> <span class="pl-s1">random</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>

<span class="pl-s1">random</span>.<span class="pl-en">seed</span>(<span class="pl-c1">0</span>)

<span class="pl-v">FIG_SIZE</span> <span class="pl-c1">=</span> (<span class="pl-c1">50</span>, <span class="pl-c1">25</span>)
<span class="pl-v">FONT_SZ</span> <span class="pl-c1">=</span> <span class="pl-c1">30</span>

<span class="pl-s1">font</span> <span class="pl-c1">=</span> {<span class="pl-s">'weight'</span> : <span class="pl-s">'bold'</span>,
        <span class="pl-s">'size'</span>   : <span class="pl-v">FONT_SZ</span>}

<span class="pl-s1">matplotlib</span>.<span class="pl-en">rc</span>(<span class="pl-s">'font'</span>, <span class="pl-c1">**</span><span class="pl-s1">font</span>)

<span class="pl-s1">dict</span> <span class="pl-c1">=</span> {<span class="pl-s">'AL'</span>: {<span class="pl-s">'ALF'</span>: <span class="pl-c1">1</span>,
       <span class="pl-s">'CB'</span>: <span class="pl-c1">1</span>,
       <span class="pl-s">'CC'</span>: <span class="pl-c1">2</span>,
       <span class="pl-s">'HBBN'</span>: <span class="pl-c1">6</span>,
       <span class="pl-s">'N7'</span>: <span class="pl-c1">6</span>,
       <span class="pl-s">'PW'</span>: <span class="pl-c1">2</span>,
       <span class="pl-s">'PA'</span>: <span class="pl-c1">4</span>,
       <span class="pl-s">'PE'</span>: <span class="pl-c1">3</span>,
       <span class="pl-s">'PPC'</span>: <span class="pl-c1">2</span>,
       <span class="pl-s">'TI'</span>: <span class="pl-c1">15</span>},
<span class="pl-s">'ALF'</span>: {<span class="pl-s">'AL'</span>: <span class="pl-c1">2</span>,
        <span class="pl-s">'PE'</span>: <span class="pl-c1">6</span>,
        <span class="pl-s">'PET'</span>: <span class="pl-c1">13</span>},
<span class="pl-s">'CB'</span>: {<span class="pl-s">'N7'</span>: <span class="pl-c1">1</span>,
       <span class="pl-s">'PA'</span>: <span class="pl-c1">16</span>},
<span class="pl-s">'CC'</span>: {<span class="pl-s">'AE'</span>: <span class="pl-c1">1</span>,
       <span class="pl-s">'AL'</span>: <span class="pl-c1">30</span>,
       <span class="pl-s">'PW'</span>: <span class="pl-c1">1</span>,
       <span class="pl-s">'PA'</span>: <span class="pl-c1">27</span>,
       <span class="pl-s">'ST'</span>: <span class="pl-c1">1</span>},
<span class="pl-s">'PW'</span>: {<span class="pl-s">'AL'</span>: <span class="pl-c1">33</span>,
       <span class="pl-s">'ALF'</span>: <span class="pl-c1">4</span>,
       <span class="pl-s">'CC'</span>: <span class="pl-c1">6</span>,
       <span class="pl-s">'HBBC'</span>: <span class="pl-c1">1</span>,
       <span class="pl-s">'PA'</span>: <span class="pl-c1">4</span>,
       <span class="pl-s">'PC'</span>: <span class="pl-c1">9</span>,
       <span class="pl-s">'PE'</span>: <span class="pl-c1">8</span>,
       <span class="pl-s">'PET'</span>: <span class="pl-c1">4</span>,
       <span class="pl-s">'PWC'</span>: <span class="pl-c1">8</span>},
<span class="pl-s">'PC'</span>: {<span class="pl-s">'AL'</span>: <span class="pl-c1">4</span>,
       <span class="pl-s">'PW'</span>: <span class="pl-c1">1</span>,
       <span class="pl-s">'PA'</span>: <span class="pl-c1">1</span>,
       <span class="pl-s">'PWC'</span>: <span class="pl-c1">1</span>},
<span class="pl-s">'PE'</span>: {<span class="pl-s">'AL'</span>: <span class="pl-c1">8</span>,
       <span class="pl-s">'ALF'</span>: <span class="pl-c1">3</span>,
       <span class="pl-s">'HBBC'</span>: <span class="pl-c1">1</span>,
       <span class="pl-s">'HBBN'</span>: <span class="pl-c1">2</span>,
       <span class="pl-s">'N7'</span>: <span class="pl-c1">2</span>,
       <span class="pl-s">'PBC'</span>: <span class="pl-c1">1</span>,
       <span class="pl-s">'PWC'</span>: <span class="pl-c1">12</span>,
       <span class="pl-s">'PPL'</span>: <span class="pl-c1">1</span>},
<span class="pl-s">'PPC'</span>: {<span class="pl-s">'AL'</span>: <span class="pl-c1">14</span>,
        <span class="pl-s">'CC'</span>: <span class="pl-c1">7</span>,
        <span class="pl-s">'PA'</span>: <span class="pl-c1">1</span>},
<span class="pl-s">'PPB'</span>: {<span class="pl-s">'N7'</span>: <span class="pl-c1">6</span>,
        <span class="pl-s">'PC'</span>: <span class="pl-c1">3</span>,
        <span class="pl-s">'ST'</span>: <span class="pl-c1">6</span>},
<span class="pl-s">'TE'</span>: {<span class="pl-s">'AL'</span>: <span class="pl-c1">20</span>,
       <span class="pl-s">'CC'</span>: <span class="pl-c1">46</span>,
       <span class="pl-s">'PA'</span>: <span class="pl-c1">3</span>,
       <span class="pl-s">'PE'</span>: <span class="pl-c1">1</span>},
<span class="pl-s">'TI'</span>: {<span class="pl-s">'AL'</span>: <span class="pl-c1">101</span>,
       <span class="pl-s">'CC'</span>: <span class="pl-c1">2</span>,
       <span class="pl-s">'HC'</span>: <span class="pl-c1">1</span>,
       <span class="pl-s">'N7'</span>: <span class="pl-c1">2</span>,
       <span class="pl-s">'PW'</span>: <span class="pl-c1">2</span>,
       <span class="pl-s">'PA'</span>: <span class="pl-c1">5</span>,
       <span class="pl-s">'PC'</span>: <span class="pl-c1">6</span>,
       <span class="pl-s">'PWC'</span>: <span class="pl-c1">2</span>,
       <span class="pl-s">'PPC'</span>: <span class="pl-c1">4</span>,
       <span class="pl-s">'PPL'</span>: <span class="pl-c1">4</span>}}

<span class="pl-s1">colors</span> <span class="pl-c1">=</span> [
    <span class="pl-s">'AliceBlue'</span>, <span class="pl-s">'Chartreuse'</span>, <span class="pl-s">'Aqua'</span>, <span class="pl-s">'Aquamarine'</span>, <span class="pl-s">'Azure'</span>, <span class="pl-s">'Beige'</span>, <span class="pl-s">'Bisque'</span>,
    <span class="pl-s">'BlanchedAlmond'</span>, <span class="pl-s">'BlueViolet'</span>, <span class="pl-s">'BurlyWood'</span>, <span class="pl-s">'CadetBlue'</span>, <span class="pl-s">'AntiqueWhite'</span>
]

<span class="pl-s1">klass_names</span> <span class="pl-c1">=</span> <span class="pl-s1">dict</span>.<span class="pl-en">keys</span>()

<span class="pl-s1">random</span>.<span class="pl-en">shuffle</span>(<span class="pl-s1">colors</span>)

<span class="pl-s1">klass_color_dict</span> <span class="pl-c1">=</span> {}
<span class="pl-s1">legend_dict</span> <span class="pl-c1">=</span> {}

<span class="pl-s1">fig</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>(<span class="pl-s1">figsize</span><span class="pl-c1">=</span><span class="pl-v">FIG_SIZE</span>)

<span class="pl-k">for</span> <span class="pl-s1">klass</span> <span class="pl-c1">in</span> <span class="pl-s1">klass_names</span>:
    <span class="pl-s1">col</span> <span class="pl-c1">=</span> <span class="pl-s1">random</span>.<span class="pl-en">choice</span>(<span class="pl-s1">colors</span>)
    <span class="pl-k">while</span> <span class="pl-s1">col</span> <span class="pl-c1">in</span> <span class="pl-s1">klass_color_dict</span>.<span class="pl-en">values</span>():
        <span class="pl-s1">col</span> <span class="pl-c1">=</span> <span class="pl-s1">random</span>.<span class="pl-en">choice</span>(<span class="pl-s1">colors</span>)
    <span class="pl-s1">klass_color_dict</span>[<span class="pl-s1">klass</span>] <span class="pl-c1">=</span> <span class="pl-s1">col</span>

<span class="pl-k">for</span> <span class="pl-s1">klass</span> <span class="pl-c1">in</span> <span class="pl-s1">klass_names</span>:
    <span class="pl-k">for</span> <span class="pl-s1">subklass</span> <span class="pl-c1">in</span> <span class="pl-s1">dict</span>[<span class="pl-s1">klass</span>].<span class="pl-en">keys</span>():
            <span class="pl-s1">color</span> <span class="pl-c1">=</span> <span class="pl-s1">klass_color_dict</span>.<span class="pl-en">get</span>(<span class="pl-s1">subklass</span>)
            <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s1">subklass</span>
            <span class="pl-k">if</span> <span class="pl-s1">legend_dict</span>.<span class="pl-en">get</span>(<span class="pl-s1">label</span>, <span class="pl-c1">0</span>) <span class="pl-c1">==</span> <span class="pl-c1">0</span>:
                <span class="pl-s1">legend_dict</span>[<span class="pl-s1">label</span>] <span class="pl-c1">=</span> <span class="pl-c1">1</span>
            <span class="pl-k">else</span>:
                <span class="pl-s1">label</span> <span class="pl-c1">=</span> <span class="pl-s">""</span>
            <span class="pl-s1">p1</span> <span class="pl-c1">=</span> <span class="pl-s1">ax</span>.<span class="pl-en">bar</span>(<span class="pl-s1">x</span><span class="pl-c1">=</span><span class="pl-s1">klass</span>, <span class="pl-s1">height</span><span class="pl-c1">=</span><span class="pl-s1">dict</span>[<span class="pl-s1">klass</span>][<span class="pl-s1">subklass</span>], <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s1">color</span>, <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s1">label</span>)
            <span class="pl-s1">ax</span>.<span class="pl-en">bar_label</span>(<span class="pl-s1">p1</span>, <span class="pl-s1">label_type</span><span class="pl-c1">=</span><span class="pl-s">'center'</span>)
            <span class="pl-en">print</span>(<span class="pl-s1">klass</span>, <span class="pl-s1">subklass</span>, <span class="pl-s1">color</span>)

<span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">"plt.jpeg"</span>)</pre></div>
<h3 dir="auto">Actual outcome</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/39809304/191127149-69c70e37-bb47-4f31-ba2a-a0838dd920e0.png"><img width="1660" alt="image" src="https://user-images.githubusercontent.com/39809304/191127149-69c70e37-bb47-4f31-ba2a-a0838dd920e0.png" style="max-width: 100%;"></a></p>
<p dir="auto">As seen above, TE bar has same color even keys are different and it's not consistent.</p>
<h3 dir="auto">Expected outcome</h3>
<p dir="auto">color values should be consistent.</p>
<h3 dir="auto">Additional information</h3>
<p dir="auto">Python docker image is used.</p>
<h3 dir="auto">Operating system</h3>
<p dir="auto">Ubuntu 18.04</p>
<h3 dir="auto">Matplotlib Version</h3>
<p dir="auto">3.6</p>
<h3 dir="auto">Matplotlib Backend</h3>
<p dir="auto">agg</p>
<h3 dir="auto">Python version</h3>
<p dir="auto">3.10.7</p>
<h3 dir="auto">Jupyter version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Installation</h3>
<p dir="auto"><em>No response</em></p>