
Forexample, in a 2x3 matrix of plots, if we want to skip the 5th plot and leave a blank there, call the 4 plots as usual, and during fifth plot, just call the plot.new() function. This can be achived using the call to plot.new() function. While plotting multiple plots using par(), sometimes we want to skip a plot in the matrix and leave a blank space in its location. Multiple curves on the same plot To skip a plot in par() Title("A visual summary of the results", outer=TRUE) # Title is given to the whole of the plot. # Three Box-Whiskers are plotted, for x, y and x vectors # we create a list of vectors and call box plot with it.

# The sixth plot is located in row 2, column 3 Pie(x = result, main="Figure-1(E)", col=rainbow(length(result)), # Create a Pie chart with a heading and rainbow colors # The fifth plot is located in row 2, column 2: # plot.new() skips a position, if needed. Plot( rpois(n=20, lambda=5), type = "h", col="purple", xlab="Poisson deviate : mean=5", # We generate 20 poinrs from a Poisson distribution and plot them. # "rnorm(10000)"generate a histogram of 10000 gaussian deviates # "runif(100)" returns 100 uniform random numbers between 0 and 1. # We generate 2 sets of 100 uniform random numbers and create their scatter plot. This is drawn at the location row 1, column 2: This is drawn at the location row 1, column 1:


# To plot along columns, usde "mfcol" instead of mfrow. # outer margin for top is 2 lines of text. # Set the outer margin for bottom, left, and right as 0 and # Set up plotting in two rows and three columns. # This script demonstrates multiple plots in a single figure.
