icaros-usc / pyribs

A bare-bones Python library for quality diversity optimization.
https://pyribs.org
MIT License
205 stars 31 forks source link

Improve cvt_archive_heatmap flexibility #354

Closed btjanaka closed 10 months ago

btjanaka commented 10 months ago

Description

This PR makes cvt_archive_heatmap more flexible by adding an ec parameter to control the edge color of the polygons.

We also rearrange several existing arguments to more closely mirror grid_archive_heatmap — specifically, we move plot_samples, plot_centroids, and ms to the end of the argument list. This reordering should not break anyone since we require keyword arguments for this method by putting a * in the signature.

Regarding style arguments for samples and centroids: I have decided to leave the sample and centroid style arguments (i.e., the arguments to ax.plot) as is for now, as it seems pretty rare to plot centroids/samples, so the added complexity of making them configurable may not be worth it. We can always add this later if there is a need for it.

This PR also fixes several bugs encountered while making these API changes.

TODO

Questions

Status