Options

The first argument of get_rough_chart is the ggplot2 chart object that you want to modify.

The second argument is a list of lists of ggrough options (one list for defaults, one list for Background and one list per geom type). The options you can use are listed below. Things not listed (e.g colors, alpha…) are inherited from the ggplot2 chart.

Lastly, you have direct access to two helper arguments that let you change the font (family) and the font size (font_size_booster).

How to write the options list

The example below changes:

  • roughness for the Background (plot.background, panel.background, panel.grid…)
  • fill_style, bowing and roughness for all GeomCol

Fill Style — fill_style

For closed shapes (i.e rectangle, circle, closed paths…), you can choose between:

  • solid
  • hachure
  • cross-hatch
  • zigzag
  • dots (currently only work with GeomCol)

Default is solid.

Fill Weight — fill_weight

The weight of each hachure line.

Default is 4.

Roughness — roughness

How rough the element should be.

Default is 1.5.

Bowing — bowing

How much bowing are you allowing.

Default is 1.

Gap — gap

The gab between each hachure line.

Default is 6.

Gap Noise — gap_noise

A percentage of noise to apply on the gap value. Use a value between 0 and 1. A gap_noise of 1 means that deviation up to 2 * gap are allowed.

Default is 0.

Angle — angle

The angle of the hachure lines.

Default is 60.

Angle Noise — angle_noise

angle_noise is a value between 0 and 1, equivalent to the percentage of possible deviation from the set angle. An angle_noise of 1 means that deviation up to 90° are allowed.

Default is 0.

Font family — family

You might be tempted to use brush and cursive font more than usual. If you are using a theme, it can be a pain to change the font family. If all you want is to replace all font by a chosen family, you can do it with the family argument in get_rough_chart.

get_rough_chart(p, options, family = "Schoolbell")

To use Google fonts, try the fantastic showtext package.

Font size — font_size_booster

Fonts get a bit smaller during the conversion. To compensate, you have two options.

  • You can make the text bigger in your ggplot chart.
  • Or you can use the font_size_booster argument in get_rough_chart.

If you use the font_size_booster argument, you will need to provide a theme. If you just want to use the default grey theme, you can call it explicitly with + theme_grey() or + theme_gray().