R ProgrammingServer Side ProgrammingProgramming

#### Artificial Intelligence : The Future Of Programming

15 Lectures 54 mins

#### Beyond Basic Programming - Intermediate Python

Most Popular

36 Lectures 3 hours

#### C Programming from scratch- Master C Programming

Best Seller

60 Lectures 8 hours

In base R, the plot with different shape of points can be created by using pch argument inside the plot function but if we want to use any sign that is not designed for pch argument by default then we should pass that particular sign. For example, if we want to use cross sign then we can use letter x with pch as pch = "x".

## Example

Consider the below vector and create the plot by displaying cross sign using letter x −

Live Demo

x<-1:10
plot(x,pch="x")

## Example

Live Demo

y<-rnorm(10)
plot(y,pch="x")

## Example

Live Demo

z<-rpois(10,3)
plot(z,pch="x")

## Output

Updated on 17-Oct-2020 09:31:03