web_display | R Documentation |
web_display
takes a ggplot object as input, and enlarges its axis
tick text, axis label text, legend title and text, and distance between the
axis labels and the axis to make it look good for web display.
web_display( p, axis_text_size = 16, axis_title_size = rel(2), axis_title_vjust_y = 1, mar_top = 1, mar_right = 1, mar_left = 1, mar_bottom = 1 )
p |
A ggplot object. |
axis_text_size |
A number, size of the tick text. Default = 16. |
axis_title_size |
A number, size of the axis labels. Default = rel(2). |
axis_title_vjust_y |
A number, distance between y label and y-axis. Default = 1. |
mar_top |
A number, top margin of the whole plot. Default = 1. |
mar_right |
A number, right margin of the whole plot. Default = 1. |
mar_left |
A number, left margin of the whole plot. Default = 1. |
mar_bottom |
A number, bottom margin of the whole plot. Default = 1. |
A ggplot object.
inst/examples/ex-web_display.R
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.