In this tutorial, we will learn how to change the order of panes in a plot made with facet_wrap() or facet_grid(). We will use forcats package’s function fct_relevel() to specify the order we want while plotting. Let us make a scatterplot with facets using facet_wrap() function in ggplot2. Change order of plots in facet_wrap() with… Continue reading How to specify the order of panes in facet_wrap
Author: datavizpyr
How to Format Date in title text in ggplot2
In this tutorial, we will learn how to format date variables in the title text of a plot made with ggplot2. Sometimes one might want to write date in the title text. It is better to use the date as variable and format the way want, either full month or short month or full/partial days.… Continue reading How to Format Date in title text in ggplot2
How to Add matching colors to keywords in title text
In this tutorial, we will learn how to color select words in title text with matching colors as in the plot made with ggplot. For example, if we had made a bar plot with two colors for two groups with ggplot2, we will learn how to color the group names in the title text with… Continue reading How to Add matching colors to keywords in title text
How to selectively add color to title text in ggplot2
In this tutorial, we will learn how to specify colors to selective words of title text in ggplot2. For example, if we had made a plot with ggplot2 and have title text to describe the plot, we will learn how to color certain words of the title not the whole title text. We will use… Continue reading How to selectively add color to title text in ggplot2
How to make Grouped barplots with Matplotlib in Python
In this tutorial, we will learn how to make grouped barplot using Matplotlib in Python. We will learn how to make a gropued barplot in a realize scenario, where the data is in a Pandas dataframe and we have do some data munging to get the data to make grouped barplot. Let us first load… Continue reading How to make Grouped barplots with Matplotlib in Python