mirror of
https://github.com/vale981/hiroplotutils
synced 2025-03-04 09:01:40 -05:00
fix plot function getting the wrong arguments
This commit is contained in:
parent
1f55ca58e1
commit
e3e1184eec
1 changed files with 15 additions and 11 deletions
|
@ -313,6 +313,7 @@ class PlotContainer:
|
|||
vertical: float = size[1] if isinstance(size, tuple) else self._default_ratio
|
||||
|
||||
fig.set_size_inches(horizontal, vertical * horizontal)
|
||||
|
||||
save_figure(
|
||||
fig,
|
||||
f"{num[0]:03}_{num[1]:03}_" + fig.get_label(),
|
||||
|
@ -337,19 +338,23 @@ class PlotContainer:
|
|||
plot_index = len(self._plots) + 1
|
||||
for sub_index, keywords in enumerate(args):
|
||||
logging.info("Registered plot", f, keywords)
|
||||
|
||||
plots.append(
|
||||
(
|
||||
lambda: [
|
||||
self._pyplot_config(),
|
||||
self._save_fig(
|
||||
f(**keywords),
|
||||
size,
|
||||
(plot_index, sub_index + 1),
|
||||
),
|
||||
]
|
||||
and None,
|
||||
delayed(
|
||||
lambda kw, index: [
|
||||
self._pyplot_config(),
|
||||
self._save_fig(
|
||||
f(**kw),
|
||||
size,
|
||||
index,
|
||||
),
|
||||
]
|
||||
and None
|
||||
),
|
||||
f,
|
||||
keywords,
|
||||
(plot_index, sub_index + 1),
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -383,7 +388,6 @@ class PlotContainer:
|
|||
cmd_args = parser.parse_args()
|
||||
|
||||
if cmd_args.list:
|
||||
print("hi")
|
||||
format = "{:2d} {:03}_{:03}_{:<30} "
|
||||
total = 1
|
||||
for i, plot_group in enumerate(self._plots):
|
||||
|
@ -410,4 +414,4 @@ class PlotContainer:
|
|||
if "backend" not in kwargs:
|
||||
kwargs["backend"] = "loky"
|
||||
|
||||
Parallel(*args, **kwargs)(delayed(flattened[i][0])() for i in only)
|
||||
Parallel(*args, **kwargs)(flattened[i][0](*flattened[i][-2:]) for i in only)
|
||||
|
|
Loading…
Add table
Reference in a new issue