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 +0,0 @@
from .pygrace import saveagr

View File

@@ -1,5 +1,4 @@
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
from collections import OrderedDict
from itertools import cycle
@@ -10,9 +9,9 @@ def make_cmap(colors, mapping=True):
colors = np.array(colors.values())
bit_rgb = np.linspace(0, 1, 256)
position = np.linspace(0, 1, len(colors))
_cols = colors[:] + 0
_cols = colors[:] + 0
for i in range(len(colors)):
for j in xrange(3):
for j in range(3):
_cols[i][j] = bit_rgb[colors[i][j]]
if mapping:
cdict = {'red': [], 'green':[], 'blue':[]}

View File

@@ -263,13 +263,13 @@ legend char size {legend_fontsize}
getattr(self, d)()
sanitize_strings(self.__dict__)
self.lines = {'s{}'.format(i): AgrLine(l, self) for i, l in enumerate(axis.lines)}
self.lines = {'s{}'.format(i): AgrLine(line, self) for i, line in enumerate(axis.lines)}
self.texts = [AgrText(t, self) for t in self.axis.texts]
def __str__(self):
o = self.fmt.format(**self.__dict__)
for k, l in self.lines.items():
o += textwrap.indent(str(l), prefix=k + ' ')
for k, line in self.lines.items():
o += textwrap.indent(str(line), prefix=k + ' ')
for txt in self.texts:
o += 'with string\n'
o += textwrap.indent(str(txt), prefix=' ')