fixed linter errors and ambigious variable names

This commit is contained in:
2025-11-06 17:37:02 +01:00
parent 96258c47ab
commit dbdd7b4540
9 changed files with 13 additions and 33 deletions

View File

@@ -1,7 +1,6 @@
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
from collections.abc import Iterable
from matplotlib.cbook import flatten
from itertools import cycle
@@ -48,8 +47,8 @@ def facet_plot(dframe, facets, props, ydata, layout=None, newfig=True, figsize=N
plot_kwargs = kwargs.copy()
for k in ['logx', 'logy', 'loglog']:
plot_kwargs.pop(k, None)
for l, p in prop_styles.items():
ax0.plot([], label=str(l), **p, **plot_kwargs)
for label, p in prop_styles.items():
ax0.plot([], label=str(label), **p, **plot_kwargs)
ax0.legend(loc='center left', bbox_to_anchor=(1, 0.5), fontsize='x-small')
for ax, (ps, df) in zip(flatten(axs), dframe.groupby(facets, squeeze=False)):
for prop, df_prop in df.groupby(props):
@@ -130,7 +129,7 @@ class CurvedText(mpl.text.Text):
# points of the curve in figure coordinates:
x_fig,y_fig = (
np.array(l) for l in zip(*self.axes.transData.transform([
np.array(line) for line in zip(*self.axes.transData.transform([
(i,j) for i,j in zip(self.__x,self.__y)
]))
)