Skip to content

Plotting

Michael Grupp edited this page Apr 21, 2018 · 25 revisions

There are several settings that allow you to change the appearance of plots.

In the command line apps, take a look at parameters like --plot, --plot_mode etc. More general, package-wide settings can be set via evo_config set (see "Configuration" section). Have a look at evo_config show to see all available settings and their current values.

Example configuration for print-quality plots

This is an example walkthrough for how you could theoretically change the plot settings to produce high-quality plots for print (thesis, paper...).

1. Set the plot grid and background

The default plot settings have a dark background. This looks good on the screen, but is not suitable for printing. We can change the background to a grid with white background by changing the style parameter of Seaborn with:

evo_config set plot_seaborn_style whitegrid

2. Set the font type and scale

The default font doesn't really fit to the rest of our paper, which uses a small serif font. We can switch to a smaller serif font by calling:

evo_config set plot_fontfamily serif plot_fontscale 0.85

To match the smaller font, we also reduce the line width:

evo_config set plot_linewidth 1.0

3. Set the default figure size

You can adjust the default plot figure size, too. For example to a width of 5 and a height of 4.5:

evo_config set plot_fontfamily serif plot_figsize 5 4.5

4. Use LaTeX renderer

Because we use LaTeX to write the paper, we want to render the fonts of the plots with LaTeX, too:

evo_config set plot_usetex

You may need to change the plot_texsystem parameter to the LaTeX system that's installed on your machine if this doesn't work on the first try, see evo_config show.

Advanced: plots can be also exported (--save_plot) in pgf format: evo_config set plot_export_format pgf.

5. Restore default settings

evo_config reset
Clone this wiki locally