intel / p3-analysis-library

A library simplifying the collection and interpretation of P3 data.
https://intel.github.io/p3-analysis-library/
MIT License
7 stars 10 forks source link

Cascade plot crashes with too many applications #42

Closed Pennycook closed 4 months ago

Pennycook commented 4 months ago

Expected behavior

We should either:

This is similar to #39, except that instead of running out of platform labels, we run out of markers.

Actual behavior

Traceback (most recent call last):
  File "/home/p3-analysis-library/script.py", line 166, in <module>
    cascade = p3.plot.cascade(eff_df)
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/p3-analysis-library/p3/plot/_cascade.py", line 94, in cascade
    return CascadePlot(df, eff, size, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/p3-analysis-library/p3/plot/backend/matplotlib.py", line 248, in __init__
    app_handles = self.__efficiency_cascade(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/p3-analysis-library/p3/plot/backend/matplotlib.py", line 364, in __efficiency_cascade
    marker=markers[app_name],
           ~~~~~~~^^^^^^^^^^
KeyError: 'ApplicationName'

Steps to reproduce the problem

Try to plot a cascade with a large number of applications.

Specifications

Tested with the tip of main.