Skip to content

Set plot backgrounds to white for legibility on dark backgrounds#885

Open
rben01 wants to merge 3 commits intobheisler:masterfrom
rben01:master
Open

Set plot backgrounds to white for legibility on dark backgrounds#885
rben01 wants to merge 3 commits intobheisler:masterfrom
rben01:master

Conversation

@rben01
Copy link

@rben01 rben01 commented Sep 14, 2025

This PR sets plot backgrounds to white in both the gnuplot and plotters backends. I'm not sure how to test this, so for verification, attached are the reports you get when running the following command with and without gnuplot installed:

cargo test --features plotters --features html_reports --test criterion_tests test_output_files

criterion-output.zip

The reports are saved to a tempdir, so if you would like to replicate this yourself, you should place the following at the top of the test function and then add -- --nocapture to the command above.

let mut tempdir = temp_dir();
tempdir.disable_cleanup(true);
eprintln!("{tempdir:?}");  // copy this and cd to it in another shell

Screenshots of the reports in dark mode:

Gnuplot:
report

Plotters:
report

@rben01
Copy link
Author

rben01 commented Sep 15, 2025

I think the horizontal blue line in the second screenshot is an artifact of having had web inspector open and not inherent to the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant