icaros-usc / pyribs

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

Add `rasterized` arg for heatmaps #359

Closed btjanaka closed 10 months ago

btjanaka commented 10 months ago

Description

A useful feature in heatmap visualizations is to rasterize the heatmap itself but not the surrounding text of the plot. This is useful when saving to PDF for instance, as we want to rasterize the heatmap so that the PDF does not have to render hundreds or thousands of cells. Instead, it can just render a single image for the heatmap, while the surrounding text is maintained in vector format.

Previously, we had to rasterize the entire plot, so even the text was converted to pixels when it can easily be represented in vector format.

The API change is to add a rasterized argument to grid_archive_heatmap, cvt_archive_heatmap, and sliding_boundareis_archive_heatmap. This is similar to how Matplotlib methods like pcolormesh handle rasterization.

TODO

Questions

Status