Graphics Programs Reference
In-Depth Information
FIGurE 6-18 Bubble chart with bubbles scaled down
Now you're getting somewhere.
You also can make a chart with other shapes, too, with symbols() —you can
make squares, rectangles, thermometers, boxplots, and stars. They take
different arguments than the circle. The squares, for example, use side
length to size; however, like with bubbles, you want the squares to be sized
by area. In other words, you need to size the square sides by the square
root of the area.
Figure 6-19 shows what squares look like using the following line of code:
symbols(crime$murder, crime$burglary,
squares=sqrt(crime$population), inches=0.5)
Stick with circles for now. The chart in Figure 6-18 shows some sense
of distribution, but you don't know which circle represents each state.
So now add labels. with text() , whose arguments are x-coordinates,
Search WWH ::




Custom Search