Skip to content

prop_cycler was made internal #96

@syoh

Description

@syoh

Following code from symbulate paper errors out:

from symbulate import *

P = PoissonProcessProbabilitySpace(rate=1)
N = RV(P)
n = N.sim(100)
n.plot()
n.mean().plot()

Following is the error message:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[1], line 6
      4 N = RV(P)
      5 n = N.sim(100)
----> 6 n.plot()
      7 n.mean().plot()

File /opt/conda/lib/python3.11/site-packages/symbulate/results.py:608, in RVResults.plot(self, type, alpha, normalize, jitter, bins, **kwargs)
    606     alpha = np.log(2) / np.log(len(self) + 1)
    607 ax = plt.gca()
--> 608 color = get_next_color(ax)
    609 for result in self.results:
    610     result.plot(alpha=alpha, color=color, **kwargs)

File /opt/conda/lib/python3.11/site-packages/symbulate/plot.py:20, in get_next_color(axes)
     19 def get_next_color(axes):
---> 20     color_cycle = axes._get_lines.prop_cycler
     21     color = next(color_cycle)["color"]
     22     return color

AttributeError: '_process_plot_var_args' object has no attribute 'prop_cycler'

prop_cycler is from this line:

color_cycle = axes._get_lines.prop_cycler

It seems the method prop_cycler was made internal with matplotlib 3.8: matplotlib/matplotlib#26831
(I am running matplotlib 3.8.4.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions