Skip to content

Themes

Several aspects of a plot can be manually configured to customize the static visual properties of the visualization.

Several pre-made themes are provided for convenience. Any theme, including the default, can be manually tweaked by passing a dictionary of the desired changes to .qp.theme. See .qp.theme for the list of built-in themes.

The theme keys that can be changed are outlined below.

Where colours appear, either a 3-value byte array (0xRRGGBB), a 4-value byte array (0xAARRGGBB), or a symbol for a defined colour name from .gg.colour can be used.

property example value
marker_default_fill 0x336699
aspect_ratio `fit or `square
padding_left 5
padding_top 5
padding_right 5
padding_bottom 5
grid_majorLine_strokewidth 5
grid_majorLine_fill 0xBADFDFDF
grid_minorLine_strokewidth 5
grid_minorLine_fill 0xBADFDFDF
grid_style_x `lines or `zebra or `none
grid_style_y `lines or `zebra or `none
axis_line_strokewidth 5
axis_line_fill 0xFFAAAAAA
axis_label_stroke 5
axis_label_fontsize 10
axis_label_fill 0xEF111111
axis_tick_length_x 0.1
axis_tick_length_y 0.1
axis_tick_label_angle_x 90
axis_tick_label_angle_y 0
axis_tick_label_start_x 0.75
axis_tick_label_start_y 0.75
axis_tick_label_anchor_x `left or `middle or `right
axis_tick_label_anchor_y `left or `middle or `right
axis_tick_label_strokewidth 5
axis_tick_label_fill 0xEF6F6F6F
axis_tick_label_fontsize 8
axis_size_x 80
axis_size_y 100
axis_use_x 1b or 0b
axis_use_y 1b or 0b
axis_offset 5
plot_background_fill 0xFFF4F4F8
plot_background_stroke 0x00000000
legend_header_background_fill 0xFFE2E2E2
legend_header_background_stroke 0x00000000
legend_header_height 16
legend_height 120
legend_use 1b or 0b
legend_width 65
legend_padding_top 4
legend_padding_right 10
legend_padding_left 10
legend_padding_bottom 4
legend_background_fill 0x00000000
legend_background_stroke 0x00000000
legend_title_size 10
legend_offset 5
legend_tick_length 0.1
legend_tick_label_start 0.75
title_padding 22
title_fontsize 18
title_strokewidth 1
title_fill 0xEF111111
title_background_fill 0x00000000
title_x_start .5
title_x_offset 0
title_anchor `left or `middle or `right
canvas_fill 0x00000000

.gg.theme.blank

A blank theme with no axes

See Also: .qp.theme

.gg.theme.clean

Clean scale, white background

See Also: .qp.theme

.gg.theme.cleanblue

Clean light theme with gray canvas and blue marks

See Also: .qp.theme

.gg.theme.dark

Dark theme

See Also: .qp.theme

.gg.theme.deepblue

A dark theme with blue accent

See Also: .qp.theme

.gg.theme.default

Default theme for visualizations

See Also: .qp.theme

.gg.theme.light

Light theme, white background

See Also: .qp.theme

.gg.theme.transparent

Transparent theme, no background, no grid

See Also: .qp.theme

.gg.theme.white

A basic white theme with no grid lines

See Also: .qp.theme