Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ PairGrid | Multi-Plot Grids
/
Deep Dive into the seaborn Visualization
セクション 5.  2
single

single

bookPairGrid

メニューを表示するにはスワイプしてください

PairGrid is a subplot grid for plotting pairwise relationships in a dataset.

This object maps each variable in a dataset onto a column and row in a grid of multiple axes. Different axes-level plotting functions can be used to draw bivariate plots in the upper and lower triangles, and then the marginal distribution of each variable can be shown on the diagonal.

carousel-imgcarousel-imgcarousel-imgcarousel-imgcarousel-imgcarousel-img
import pandas as pd
import seaborn as sns
from matplotlib import pyplot as plt

df = pd.read_csv('filename.csv')

# Creating the PairGrid variable
g = sns.PairGrid(df)

# Setting diagonale plots
g.map_diag(sns.histplot)

# Setting non-diagonal plots
g.map_offdiag(sns.scatterplot)

plt.show()
タスク

スワイプしてコーディングを開始

  1. Set the 'ticks' style with the 'lightpink' figure.facecolor.
  2. Create a PairGrid variable using g:
  • Set the data for the g;
  • Set the hue parameter equals the 'species';
  • Set the 'rocket_r' palette.

Set diagonale plots using the .map_diag() function:

  • Create a histplot using the seaborn;
  • Add the kde parameter.

Set non-diagonale plots using the .map_offdiag() function:

  • Create a scatterplot using the seaborn;
  • Set the linewidth parameter equals 0.9;
  • Set the 'purple' edgecolor parameter.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 5.  2
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt