![]() ![]() ![]() For that purpose, you can use of the height and width arguments of the following functions, depending on your system. However, you may need to customize the height and width of the window, that defaults to 7 inches (17.78 cm). When creating plots in R base they will be opened in a new window. Plot(fun, 0, 10, main = "Plot a function") Plot(my_dates, rnorm(50), main = "Time based plot") Plot(my_factor, rnorm(32), main = "Boxplot") If you execute the following code you will obtain the different plot examples. Plot of the function between the lower and maximum value specified Function and argumentsīoxplot of the numeric vector and the levels of the factorĬorrelation plot of all dataframe columns (more than two columns) In the following table we summarize all the available possibilities for the base R plotting function. With the plot function you can create a wide range of graphs, depending on the inputs. You can create a plot of the previous data typing: # Plot the data We are going to simulate two random normal variables called x and y and use them in almost all the plot examples. The R plot function allows you to create a plot passing two vectors (of the same length), a dataframe, matrix or even other objects, depending on its class or the input type. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |