How to arrange months in right order with ggplot2

In this tutorial, we will learn how to arrange months in right order – chronologiocal order. By default, when we make a plot with months on one of the axis using ggplot2, we might get a plot with months ordered in alphabetical order, depending on how the month variable is stored in the data. Here… Continue reading How to arrange months in right order with ggplot2

How to make Donut plot with ggplot2

How to make a Donut plot

In this tutorial, we will learn how to make a donut plot in R using ggplot2. Donut plot is nothing but a bar plot, reshaped into pie-chart, and then adding a hole at the center to make it look like a donut. We will learn these in step by step manner to understand making Donut… Continue reading How to make Donut plot with ggplot2

How to change axis tick label size in ggplot2

In this post we will learn how to change axis tick label size in ggplot2 with multiple example. When we make a plot with ggplot2, plots have axis ticks- small vertical bars on both x and y axis, and tick labels – right below the ticks. We can change the size of axis tick labels… Continue reading How to change axis tick label size in ggplot2

How to make rolling mean line plot of stock data

In this post we will learn how to make a moving average line plot of stock data, a great example of time series data. rolling_mean() function in zoo package can compute moving average of data of interest over a window size. For example, if we want to compute 7-day moving average, we will use the… Continue reading How to make rolling mean line plot of stock data

Exit mobile version