Graphics Programs Reference
In-Depth Information
You could also combine the two, as shown in Figure 4-28. However, you'd
also need to use the points() method. Whenever you use the plot() function,
you create a new graphic, instead of adding new elements to an existing
graph. Following is how you would combine vertical lines and points if you
were so inclined.
plot(subscribers$Subscribers, type=”h”, ylim=c(0, 30000),
xlab=”Day”, ylab=”Subscribers”)
points(subscribers$Subscribers, pch=19, col=”black”)
The plot with vertical lines is drawn first, this time with axis labels. Points
are then added to the existing plot. The pch argument is for size, and the
col argument, which you used with the bar chart, specifies fill color.
FIGurE 4-28 Plot with high-density vertical lines
Let's go back to Figure 4-27. Save it as a PDF and then open it in Illustrator
so that we can do some designing.
Using the Selection tool, highlight labels, and change the font to your lik-
ing. Then ungroup the labels so that you can edit the vertical axis labels
individually. Use Transform ➪ Transform each to turn the labels right-side
up. Then use the Direct Selection tool to remove the vertical bar from the
axis. You don't need that—it's just taking up space.
Finally, highlight the actual points, which are plain white circles, and
use the options in the Color window to take your pick of fill and stroke
Search WWH ::




Custom Search