Hello @Masood Salik
The "IndexError" you are facing while using the 'plot' function of the "upsetplot.UpSet" Python library is likely related to the Tcl/Tk library, which is often used by the 'matplotlib' library for rendering plots when using the TkAgg backend. This issue typically arises when the Python environment is unable to locate the Tcl/Tk installation required for the TkAgg backend.
To resolve this, try specifying the TCL_LIBRARY and TK_LIBRARY environment variables to point to the correct directories in the MATLAB Command Window.
For example, you can use the code given below:
setenv('TCL_LIBRARY', 'C:\Users\USERNAME\AppData\Local\Programs\Python\Python38\tcl\tcl8.6');
setenv('TK_LIBRARY', 'C:\Users\USERNAME\AppData\Local\Programs\Python\Python38\tcl\tk8.6');
Using MATLAB 2022b and Python 3.8, I attempted to replicate the error you encountered. By setting the specified environment variables, I successfully resolved the issue and generated the desired plot. Please find the attached screenshot of the output for your reference.