![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Display infinity and minus infinity both symbols in one base R plot.
To display infinity and minus infinity symbol in one base R plot, we can use text function and expression function. Inside expression function we can put infinity word for the display of infinity and infinity word with minus sign for the display of minus infinity.
Check out the below Examples to understand how it can be done.
Example 1
To display infinity and minus infinity symbol in one base R plot use the following code −
plot(1:10,type="n") text(c(1,5),expression(-infinity,infinity))
Output
If you execute the above given snippet, it generates the following Output −
Example 2
To display infinity and minus infinity symbol in one base R plot use the following code −
plot(1:10,type="n") text(c(4,8),c(2,9),expression(infinity,-infinity))
Output
If you execute the above given snippet, it generates the following Output −
Advertisements