

- 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
How to change the border style of a circle in R?
<p>We can create a circle in R by using draw.circle function of plotrix package and default border will be like straight lines. If we want to change the border style of a circle then we can use lty argument and set it to different values as shown in the below Examples.</p><h2>Example</h2><p>To change the border style of a circle in R use the following snippet −</p><pre class="demo-code notranslate language-rscript" data-lang="rscript">plot(1:10,type="n")</pre><h2>Output</h2><p>If you execute the above given snippet, it generates the following Output −</p><p><img class="fr-fic fr-dii"><img src="https://www.tutorialspoint.com/assets/questions/media/58925/125.1ques.png" class="fr-fic fr-dib" width="568" height="552"></p><p>To change the border style of a circle in R add the following code to the above snippet −</p><pre class="just-code notranslate language-rscript" data-lang="rscript">plot(1:10,type="n") library(plotrix) draw.circle(5,5,2) </pre><h2>Output</h2><p>If you execute all the above given snippets as a single program, it generates the following Output −</p><p><img src="https://www.tutorialspoint.com/assets/questions/media/58925/125.2ques.png" class="fr-fic fr-dib" width="568" height="552"><img class="fr-fic fr-dii"></p><p>To change the border style of a circle in R add the following code to the above snippet −</p><pre class="just-code notranslate language-rscript" data-lang="rscript">plot(1:10,type="n") library(plotrix) draw.circle(5,5,2,lty=9)</pre><h2>Output</h2><p>If you execute all the above given snippets as a single program, it generates the following Output −</p><p><img class="fr-fic fr-dii"><img src="https://www.tutorialspoint.com/assets/questions/media/58925/125.3ques.png" class="fr-fic fr-dib" width="568" height="552"></p><p>To change the border style of a circle in R add the following code to the above snippet −</p><pre class="just-code notranslate language-rscript" data-lang="rscript">plot(1:10,type="n") library(plotrix) draw.circle(5,5,2,lty=20)</pre><h2>Output</h2><p>If you execute all the above given snippets as a single program, it generates the following Output −</p><p><img class="fr-fic fr-dii"><img src="https://www.tutorialspoint.com/assets/questions/media/58925/125.4ques.png" class="fr-fic fr-dib" width="568" height="552"></p>
- Related Questions & Answers
- How to change the border style of a plot using ggplot2 in R?
- Change the style of top border with CSS
- Change the style of left border with CSS
- Change the style of bottom border with CSS
- Change the style of the right border with CSS
- How to change the border color of box of a base R plot?
- How to create a circle with different color border in R?
- How to change the plot border color of a ggplot2 graph in R?
- How to change the border line type in base R boxplot?
- How to set the scale factor (border) of a Circle using FabricJS?
- How to change the border color of points in a scatterplot created with ggplot2 in R?
- Change the color of legend element border using ggplot2 in R.
- How to set the style of controlling corners of a Circle using FabricJS?
- How to set the border opacity of a Circle while moving using FabricJS?
- With JavaScript how to change the width of a table border?
Advertisements