Size of Pie chart is very small
Title
Question
<font size="2"># Clear R workspace</font>
<font size="2">rm(list = ls() )</font>
<font size="2">
</font>
</font>
<font size="2"># Declare a variable to read and store moviesData</font>
<font size="2">movies <- read.csv("moviesData.csv")</font>
<font size="2">
</font>
</font>
<font size="2"># View the stored data frame</font>
<font size="2">View(movies)</font>
<font size="2">
</font>
</font>
<font size="2"># View the dimension of the data frame</font>
<font size="2">dim(movies)</font>
<font size="2">hist(movies$runtime)</font>
<font size="2">hist(movies$runtime,</font>
<font size="2"> main = "Distribution of movies' length ",</font>
<font size="2"> xlab = "Runtime of movies",</font>
<font size="2"> xlim = c(0,300),</font>
<font size="2"> col = "blue",</font>
<font size="2"> breaks = 4)</font>
<font size="2">genreCount <- table(movies$genre)</font>
<font size="2">View(genreCount)</font>
<font size="2">pie(genreCount)</font>
<font size="2">pie(genreCount,</font>
<font size="2"> main = "proportion of movies' genre",</font>
<font size="2"> border = "blue",</font>
<font size="2"> col = "orange")</font>
<font size="2">The above is my code and I am getting a pie chart which js very small</font>
R Plotting-Histograms-and-Pie-Chart 07-08 min 20-30 sec
Answers:
In pie() , use radius function,
Eg:: in your case,
pie(genreCount, radius=1)
You can change the radius size according to your preference
Login to add comment