Skip to content

Plotting

Michael Grupp edited this page Dec 27, 2019 · 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 serif font. The relative size of the text labels in the plot figure could also be increased for better readability. We can switch to a serif font with larger scale by calling:

evo_config set plot_fontfamily serif plot_fontscale 1.2

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

evo_config set plot_linewidth 1.0

There are some other things you can change, for example the line style of the reference trajectory:

evo_config set plot_reference_linestyle -

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_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

Coordinate axis markers

Coordinate axis markers can be activated by setting plot_axis_marker_scale to a non-zero value, for example:

evo_config set plot_axis_marker_scale 0.1

You probably need to play around with this scale value to adjust it to the size of your trajectories. Set it to 0 again if you don't need it anymore.

Clone this wiki locally