Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
How to create a plot with cross sign in R?
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 −
x<-1:10 plot(x,pch="x")
Output

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

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

Advertisements
