- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to display base R plot axes titles in italics?
To display base R plot axes titles in italics, we can follow the below steps −
First of all, create two vectors and plot them using plot function.
Then, use expression function for ylab and xlab to change the axes titles into italics font.
Create the vectors and plot them
Let’s create two vectors Rate and Demand and plot them using plot function −
Rate<-sample(1:10,25,replace=TRUE) Demand<-sample(1:10,25,replace=TRUE) plot(Rate,Demand)
On executing, the above script generates the below output(this output will vary on your system due to randomization) −
Convert axes titles to italics
Using expression function with italic function to convert the axes titles into italic font −
Rate<-sample(1:10,25,replace=TRUE) Demand<-sample(1:10,25,replace=TRUE) plot(Rate,Demand,ylab=expression(italic("Demand")),xlab=expression(italic("Rate")))
- How to display fraction in base R plot?
- How to display both axes’ labels of a ggplot2 graph in italics in R?
- R Programming how to display both axes’ labels of a ggplot2 graph in italics?
- How to display x-bar in base R plot?
- How to display infinity symbol in base R plot?
- How to display text in base R plot with outline?
- How to display mean with underline in base R plot?
- How to display square root sign in base R plot?
- How to create a plot in base R with mixed font of plot title such as default and italics?
- How to create a base R plot without axes but keeping the frame of the plot?
- Create a ggplot2 graph without axes labels, axes titles and ticks in R.
- How to display star/asterisk sign (*) inside a base R plot?
- How to make the axes widths in a plot wider than default in base R?
- How to display text in base R plot with 180 degrees rotation?
- How to display X-axis labels inside the plot in base R?