R: using shaded fill areas

I used R to make some graphs for the report. I see that the plots do not seem so smooth. I am new to R, so I know little. But how to get smooth graphics?

Also, by default, the graphs are filled with solid colors, but I want the shaded fills to fill my pie charts and graphs. Is there a way to do this in R, I could not find it through a basic Google search, so I asked this question here.

+4
source share
3 answers

Have you tried the help (pie)?

density: the density of shading lines, in lines per inch. The default value of 'NULL' means that no shading lines are drawn. Non-positive values of 'density' also inhibit the drawing of shading lines. pie(c(1,2,3),density=c(1,2,20)) hist(runif(200),density=c(10,20,30)) 
+5
source

Please note that cross-hatching and filling with lines is a delay from the days when the only way to get high-quality graphics was using plotters (devices that literally drew the plot using a mechanical hand and pen). Hard fills did not work well on these devices, often making holes in the paper when trying.

Solid fills are now preferred with high-quality monitors and printers; in fact, studies have shown that cross-hatching can cause optical illusions due to the Moire effect, so it's best to avoid it.

Pie charts are also best avoided; the only thing they do better than the bar charts is hidden and obscure data. Dotplots are becoming preferred for histograms and with dots that you don't need to worry about filling in.

I know that this does not answer the question that you asked, but it answers the question that you should have asked.

+4
source

The idea that incubation should be sent to history books is good and good, but there are situations when you need to use hatching rather than solid fills - that is, when you need to present something in black and white. For example, many academic journals still only have black and white numbers, so using solid fills is not an option if you want to make a stack table with more than a few parameters.

+1
source

Source: https://habr.com/ru/post/1332765/


All Articles