Set Aspect Ratio in R Plot (2 Example Codes) | asp Option of Scatterplot & Barplot | plot Function

Set Aspect Ratio in R Plot (2 Example Codes) | asp Option of Scatterplot & Barplot | plot Function

Statistics Globe

4 года назад

593 Просмотров

How to set the aspect ratio of a plot in the Base R programming language. More details: https://statisticsglobe.com/asp-r-plot
R code:

set.seed(99999) # Set seed for reproducibility
x <- runif(100) # Create random x variable
y <- x + runif(100) # Create y variable correlated with x

plot(x, y) # Plot without setting aspect ratio

plot(x, y, asp = 10) # Plot with asp = 10

Тэги:

#asp_option_of_plot_function #asp_r #aspect_ratio_in_r #r_programming_plot_aspect_ratio #statistics_globe #statisticsglobe.com #statistical_programming #r_programming #statistics #r_programming_language #r_statistics #rstudio #r_language #r_tutorial #learn_r #r_code #r_programming_tutorial
Ссылки и html тэги не поддерживаются


Комментарии: