Opens your plot in a new window with the aspect ratio of the chart type selected. For fullslide chart types (fullslide, fullslide_narrow, fullslide_half), this will show the complete slide with the grey header, Grattan logo, and properly positioned title/subtitle/caption.

check_chart(type = "normal", object = ggplot2::last_plot())

check_chart_aspect_ratio(object = ggplot2::last_plot(), type = "normal")

Arguments

type

The chart type (e.g. "normal", "fullslide").

object

A ggplot2 plot object. Defaults to the last plot.

Examples

if (FALSE) { # \dontrun{
ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point()
check_chart("normal")

# Check fullslide appearance with title and subtitle
ggplot(mtcars, aes(x = wt, y = mpg)) +
  geom_point() +
  labs(title = "My title", subtitle = "My subtitle") +
  theme_grattan()
check_chart("fullslide")
} # }