• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Data Viz with Python and R

Learn to Make Plots in Python and R

  • Home
  • Python Viz
  • Seaborn
  • Altair
  • R Viz
  • ggplot2
  • About
    • Privacy Policy
  • Show Search
Hide Search

datavizpyr

How To Fold Legend into Multiple Rows in ggplot2

datavizpyr · April 23, 2021 ·

ggplot2 legend in two rows

Sometimes when we make a plot with a legend either on top or bottom, it may be too long. In this post, we will learn to fold the long legend into two or more rows (or columns) with ggplot2 in R. Example plot with long legend that needs to be wrapped into two rows We … [Read more...] about How To Fold Legend into Multiple Rows in ggplot2

Filed Under: ggplot2, R Tagged With: ggplot2 legend two rows

How to Add Labels Directly in ggplot2. Hint: Use Secondary Axis Trick

datavizpyr · April 17, 2021 ·

Direct Labelling with Secondary Axis Trick

Legends can be of great help to understand a plot. Typically, ggplot2 adds legend by default on right side of the plot based on the variable that we used to color or fill. However, as Cluas Wilke says in his fantastic book on Data Visualization, legends can make the plot … [Read more...] about How to Add Labels Directly in ggplot2. Hint: Use Secondary Axis Trick

Filed Under: Direct labeling ggplot2, ggplot2, R Tagged With: ggplot2, R

How To Customize Border in facet in ggplot2

datavizpyr · April 15, 2021 ·

Remove Space Between Panels in Facet

ggplot2's facet options are a great way make small multiples, i.e. multiple plots of the same type in a panel or grid. In this post, we will learn how to control the border line in a plot made with facet_wrap() function in ggplot2. First we will see how to remove the border … [Read more...] about How To Customize Border in facet in ggplot2

Filed Under: ggplot2, R, remove facet border Tagged With: ggplot2, R

How To Make PCA Plot with R

datavizpyr · April 6, 2021 ·

PCA plot: PC1 vs PC2

Principal Component Analysis (PCA) is one of the commonly used methods used for unsupervised learning. Making plots using the results from PCA is one of the best ways understand the PCA results. Earlier, we saw how to make Scree plot that shows the percent of variation explained … [Read more...] about How To Make PCA Plot with R

Filed Under: ggplot2, PCA plot, R Tagged With: ggplot2, R

Sinaplot vs Violin plot: Why Sinaplot is better than Violinplot

datavizpyr · March 27, 2021 ·

Sinaplot and Violinplot

In this post, we will learn how to make Sinaplot in R and show why it is a better way visualize numerical data from multiple categories. In an earlier post, we discussed the benefits of making Violinplot than making a boxplot. This is mainly due to the fact that Boxplot relies … [Read more...] about Sinaplot vs Violin plot: Why Sinaplot is better than Violinplot

Filed Under: ggplot2, R, Sinaplot ggforce Tagged With: sinaplot in R, sinaplot vs violinplot

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 20
  • Page 21
  • Page 22
  • Page 23
  • Page 24
  • Interim pages omitted …
  • Page 54
  • Go to Next Page »

Primary Sidebar

Tags

Altair barplot Boxplot boxplot python boxplot with jiitered text labels Bubble Plot Color Palette Countplot Density Plot Facet Plot gganimate ggplot2 ggplot2 Boxplot ggplot2 error ggplot boxplot ggridges ggtext element_markdown() Grouped Barplot R heatmap heatmaps Histogram Histograms Horizontal boxplot Python lollipop plot Maps Matplotlib Pandas patchwork pheatmap Pyhon Python R RColorBrewer reorder boxplot ggplot Ridgeline plot Scatter Plot Scatter Plot Altair Seaborn Seaborn Boxplot Stock Price Over Time Stripplot UpSetR Violinplot Violin Plot World Map ggplot2

Buy Me a Coffee

Copyright © 2025 · Daily Dish Pro on Genesis Framework · WordPress · Log in

Go to mobile version