- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

When we create a plot using plot function in R, the axes titles are either chosen by R automatically based on the vectors passed through the function or we can use ylab or xlab for particular axes. To add a mathematical expression in an axis label, we can use title function with expression function to define the mathematical expression.

Consider the below vectors and create scatterplot between the two −

set.seed(111) x<-rpois(1000,20) y<-rpois(1000,15) plot(x,y)

Now suppose, we want to remove y from the Y-axis and put alpha square then it can be done as shown below −

plot(x,y,ylab="") title(ylab=expression(alpha^2))

- Related Questions & Answers
- How to add a citation in a plot created by using ggplot2 in R?
- How to change the background color of a plot created by using plot function in R?
- How to create gridlines that matches with Y-axis values in the plot created by using plot function in R?
- How to add a shared x-label and y-label to a plot created with Pandas' plot? (Matplotlib)
- How to add a horizontal line to the plot created by ggplot2 in R?
- How to remove ticks in a plot created by using gglot2 in R?
- How to reduce the size of the area covered by legend in R for a plot created by using plot function?
- How to represent the legend in a plot created by using plot function with colored straight lines or stars in R?
- How to change the title of a graph to italic created by using plot function in R?
- How to change the color and size of the axes labels of a plot created by using plot function in R?
- How to highlight text inside a plot created by ggplot2 using a box in R?
- How to convert the X-axis label in a bar plot to italic using ggplot2 in R?
- How to extract data from a plot created by ggplot2 in R?
- How to create a plot in R with gridlines using plot function?
- How to create a plot in R with a different plot window size using plot function?

Advertisements