As we discussed in the previous chapter, there are two main approaches for plotting time series objects such as the zoo and xts objects:
- Direct: Using built-in or customized functions to visualize either the zoo or xts objects, such as plot.zoo and plot.xts functions, or other visualization tools from the TSstudio or dygraph packages
- Indirect: By transforming or reformatting the structure of the object and using some data visualization packages, such as ggplot2, plotly, and rbokeh
Note that plotting the zoo or xts objects with the TSstudio or dygraph packages follows the exact same process as we demonstrated in the previous chapter with the ts object. Therefore, to avoid redundancy, we will focus in this section only on the built-in visualization functions of the zoo and xts packages.
The use of either approach depends on the user's needs and...