square_fig | R Documentation |
square_fig
takes a ggplot object as input and changes its shape to
a square by default. To change the plot to different degrees of rectangular
shapes, user can specify an aspect ratio different from 1.
square_fig(p, aspect_ratio = 1)
p |
A ggplot object. |
aspect_ratio |
Aspect ratio of the panel, Default = 1, which will make x and y the same length and hence the figure a square. A value > 1 will make y-axis longer than x-axis. A value < 1 will make x-axis longer than y-axis. |
A ggplot object of square shape by default or a rectangular shape when user decides not to use 1 as aspect ratio.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.