File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # =============================================================================
2+ # Python Compiled Files: Machine-generated bytecode that speeds up execution.
3+ # These vary by OS and Python version, so they should never be committed.
4+ # =============================================================================
5+ # Folders containing .pyc files (e.g., views.cpython-312.pyc)
6+ # Matches .pyc (compiled), .pyo (optimized), and .pyd (Windows DLLs)
7+ # Compiled Java class files generated by Jython
8+ __pycache__ /
9+ * .py [cod ]
10+ * $py.class
Original file line number Diff line number Diff line change @@ -322,9 +322,19 @@ def plot_genes(self,
322322
323323 # Create an axes instance
324324 ax = fig .add_subplot (111 )
325- boxeplots = ax .boxplot (solutions_to_plot ,
326- labels = range (self .num_genes ),
327- patch_artist = True )
325+ # Matplotlib 3.9 renamed the boxplot `labels=` kwarg to
326+ # `tick_labels=` and will drop the old name in 3.11. Use whichever
327+ # name this matplotlib supports so we work on either side of the
328+ # rename without forcing users to upgrade matplotlib.
329+ import inspect
330+ _tick_kw = (
331+ "tick_labels"
332+ if "tick_labels" in inspect .signature (ax .boxplot ).parameters
333+ else "labels"
334+ )
335+ boxeplots = ax .boxplot (solutions_to_plot ,
336+ patch_artist = True ,
337+ ** {_tick_kw : range (self .num_genes )})
328338 # adding horizontal grid lines
329339 ax .yaxis .grid (True )
330340
You can’t perform that action at this time.
0 commit comments