Improve cvt_archive_heatmap flexibility #354
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 moveplot_samples
,plot_centroids
, andms
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
ec
andlw
)grid_archive_heatmap
plot_samples
when the archive has no samplesmin_obj
andmax_obj
are identical — since we normalize bymax_obj - min_obj
, we were getting such errors ifmin_obj
equaledmax_obj
Questions
Status
CONTRIBUTING.md
yapf
pytest
pylint
HISTORY.md