• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DIGNEA / DIGNEApy / 26095718918

19 May 2026 11:59AM UTC coverage: 85.418% (-6.5%) from 91.886%
26095718918

push

github

amarrerod
Updates tests. Removes some parts from coverage.

9 of 15 new or added lines in 5 files covered. (60.0%)

189 existing lines in 11 files now uncovered.

1564 of 1831 relevant lines covered (85.42%)

0.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/digneapy/visualize/_map_elites_evolution_plot.py
1
#!/usr/bin/env python
2
# -*-coding:utf-8 -*-
3
"""
4
@File    :   _map_elites_evolution_plot.py
5
@Time    :   2024/09/18 11:04:14
6
@Author  :   Alejandro Marrero
7
@Version :   1.0
8
@Contact :   amarrerd@ull.edu.es
9
@License :   (C)Copyright 2024, Alejandro Marrero
10
@Desc    :   None
11
"""
12

13
from typing import Optional
1✔
14

15
import matplotlib
1✔
16

17
matplotlib.use("Agg")  # Non-interactive backend
1✔
18
from pathlib import Path
1✔
19

20
import matplotlib.pyplot as plt
1✔
21
import pandas as pd
1✔
22
import seaborn as sns
1✔
23

24

25
def map_elites_evolution_plot(logbook=None, filename: Optional[str | Path] = ""):
1✔
UNCOV
26
    df = pd.DataFrame(logbook.select("avg"), columns=["avg"])
×
UNCOV
27
    df["min"] = logbook.select("min")
×
UNCOV
28
    df["max"] = logbook.select("max")
×
UNCOV
29
    df["Generation"] = logbook.select("gen")
×
30
    # Plot configuration
UNCOV
31
    plt.rcParams["font.family"] = "serif"
×
UNCOV
32
    plt.rcParams["font.sans-serif"] = [
×
33
        "Tahoma",
34
        "DejaVu Sans",
35
        "Lucida Grande",
36
        "Verdana",
37
    ]
UNCOV
38
    plt.rcParams["font.size"] = 16
×
UNCOV
39
    plt.figure(figsize=(12, 8))
×
UNCOV
40
    for key, color in zip(["avg", "min", "max"], ["blue", "green", "red"]):
×
UNCOV
41
        sns.lineplot(data=df, x="Generation", y=key, color=color, label=key)
×
UNCOV
42
    plt.legend(loc="best")
×
UNCOV
43
    plt.title(r"Evolution of fitness in the Map-Elites generator")
×
UNCOV
44
    plt.ylabel("Fitness")
×
UNCOV
45
    if filename:
×
UNCOV
46
        plt.savefig(filename)
×
47
    else:  # pragma: no cover
48
        plt.show()
UNCOV
49
    plt.close()
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc