Graphics Reference
In-Depth Information
mdnew <- rbind(mdx, md)
# Make the same plot as before, but with the new data, by using %+%
p %+% mdnew + coord_polar() + ylim( 0 , max(md$deaths))
Figure 8-36. Left: polar plot with theta representing x values from 0 to 12; right: the gap is filled in
by adding a dummy data point for month 0
NOTE
Notice the use of the %+% operator. When you add a data frame to a ggplot object with %+% , it replaces
the default data frame in the ggplot object. In this case, it changed the default data frame for p from md
to mdnew .
See Also
See Reversing the Order of Items in a Legend for more about reversing the direction of a legend.
See Setting the Positions of Tick Marks for more about specifying which values will have tick
marks (breaks) and labels.
Search WWH ::




Custom Search